Skip to content

Commit 7a03a9d

Browse files
committed
fix
1 parent b5a6376 commit 7a03a9d

File tree

1 file changed

+7
-1
lines changed
  • packages/svelte/src/compiler/migrate

1 file changed

+7
-1
lines changed

packages/svelte/src/compiler/migrate/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,13 @@ function migrate_slot_usage(node, path, state) {
12041204
[node.end, state.str.original.length]
12051205
]
12061206
});
1207-
state.str.appendRight(node.end, `\n${state.indent.repeat(path.length - 2)}{/snippet}`);
1207+
const str = `\n${state.indent.repeat(path.length - 2)}{/snippet}`;
1208+
1209+
if (node.type === 'SlotElement') {
1210+
state.str.appendRight(node.end, str);
1211+
} else {
1212+
state.str.appendLeft(node.end, str);
1213+
}
12081214
}
12091215
}
12101216

0 commit comments

Comments
 (0)