Skip to content

Commit 46773d5

Browse files
authored
chore: fix merge problem (#869)
1 parent 94fd3ba commit 46773d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/sv/lib/core/tooling/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ export function parseScript(content: string): {
2626
ast: TsEstree.Program;
2727
comments: Comments;
2828
} {
29-
const svelteAst = parseSvelte(`<script lang="ts">${content}</script>`);
30-
const ast = ensureScript(svelteAst);
29+
const ast = parseSvelte(`<script lang="ts">${content}</script>`);
30+
ensureScript(ast);
3131

3232
const comments = new Comments();
3333
const internal = transformToInternal(comments);
34-
internal.original.push(...svelteAst.comments);
34+
internal.original.push(...ast.comments);
3535

3636
return {
37-
ast,
37+
ast: ast.instance.content,
3838
comments
3939
};
4040
}

0 commit comments

Comments
 (0)