Skip to content

Commit 5ef167b

Browse files
fix: guard replacing root offsets to avoid circular lookups
1 parent 735f094 commit 5ef167b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/eslint-plugin-svelte/src/rules/indent-helpers/offset-context.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export class OffsetContext {
4848
if (index === base) {
4949
return;
5050
}
51+
const previousOffset = this.offsets.get(index);
52+
if (previousOffset?.type === 2) {
53+
return;
54+
}
5155
this.offsets.set(index, {
5256
type: OffsetDataType.normal,
5357
base,

0 commit comments

Comments
 (0)