Skip to content

Commit 4409c1b

Browse files
authored
(fix) correct mappings for reactive declarations
By using `appendRight` the source mappings are correct and we get proper autocompletion suggestions inside reactive statements, too
1 parent 97fdb7d commit 4409c1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/svelte2tsx/src/svelte2tsx/processInstanceScriptContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ export function processInstanceScriptContent(
438438
const end = node.getEnd() + astOffset;
439439

440440
str.prependLeft(start, ';() => {');
441-
str.prependRight(end, '}');
441+
str.appendRight(end, '}');
442442
}
443443
}
444444

0 commit comments

Comments
 (0)