Skip to content

Commit 3588f32

Browse files
committed
avoid new object allocation
1 parent 502d6dd commit 3588f32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/svelte/src/compiler/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export function compile(source, options) {
4444
const analysis = analyze_component(parsed, source, combined_options);
4545

4646
const result = transform_component(analysis, source, combined_options);
47-
return { ...result, ast: to_public_ast(source, parsed, options.modernAst) };
47+
result.ast = to_public_ast(source, parsed, options.modernAst);
48+
return result;
4849
} catch (e) {
4950
if (e instanceof CompileError) {
5051
handle_compile_error(e, options.filename, source);

0 commit comments

Comments
 (0)