Skip to content

Commit

Permalink
use a Vue key so file paths update correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
artursapek committed Aug 21, 2024
1 parent b2c3236 commit 88dc969
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/runtime/src/components/Checker.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ defineProps<{
diagnostics?: any[]
base: string
}>()
const key = (diagnostic: any): string => {
if (diagnostic.loc) {
return `${diagnostic.loc.file}-${diagnostic.loc.line}-${diagnostic.loc.column}`;
} else {
return diagnostic.id;
}
}
</script>

<template>
<ul>
<Diagnostic v-for="d in diagnostics" :diagnostic="d" :base="base" />
<Diagnostic v-for="d in diagnostics" :diagnostic="d" :base="base" :key="key(d)" />
</ul>
</template>

Expand Down

0 comments on commit 88dc969

Please sign in to comment.