Skip to content

Commit

Permalink
fix: Adjust code to be Vue 2.7 compatible as key on <template> is…
Browse files Browse the repository at this point in the history
… Vue3 only

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Dec 3, 2023
1 parent 4983a35 commit d14b351
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions core/src/views/UnifiedSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@
</template>

<!-- Grouped search results -->
<template v-for="({list, type}, typesIndex) in orderedResults" v-else :key="type">
<h2 class="unified-search__results-header">
{{ typesMap[type] }}
</h2>
<ul class="unified-search__results"
<template v-for="({list, type}, typesIndex) in orderedResults" v-else>
<h2 :key="type" class="unified-search__results-header">
{{ typesMap[type] }}
</h2>
<ul :key="type"
class="unified-search__results"
:class="`unified-search__results-${type}`"
:aria-label="typesMap[type]">
<!-- Search results -->
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "@vue/tsconfig/tsconfig.json",
"include": ["./apps/**/*.ts", "./apps/**/*.vue", "./core/**/*.ts", "./*.d.ts"],
"include": ["./apps/**/*.ts", "./apps/**/*.vue", "./core/**/*.ts", "./core/**/*.vue", "./*.d.ts"],
"compilerOptions": {
"types": ["jest", "node", "vue", "vue-router"],
"outDir": "./dist/",
Expand All @@ -18,6 +18,9 @@
"resolveJsonModule": true,
"strict": true,
},
"vueCompilerOptions": {
"target": 2.7
},
"ts-node": {
// these options are overrides used only by ts-node
// same as our --compilerOptions flag and our TS_NODE_COMPILER_OPTIONS environment variable
Expand Down

0 comments on commit d14b351

Please sign in to comment.