Skip to content

Commit 52c0d9f

Browse files
committed
fix: move snippets to correct place when only module script present
#2640
1 parent b5ec504 commit 52c0d9f

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte2tsx/src/svelte2tsx

1 file changed

+1
-1
lines changed

packages/svelte2tsx/src/svelte2tsx/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export function svelte2tsx(
180180
end,
181181
scriptTag
182182
? scriptTag.start + 1 // +1 because imports are also moved at that position, and we want to move interfaces after imports
183-
: moduleScriptTag.end
183+
: instanceScriptTarget
184184
);
185185
} else if (scriptTag) {
186186
str.move(start, end, renderFunctionStart);

0 commit comments

Comments
 (0)