Skip to content

Commit 12b3a26

Browse files
committed
fix: exclude slots
1 parent 097ce8f commit 12b3a26

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export function migrate(source) {
269269
if (state.props.length > 0 && state.analysis.accessors) {
270270
str.appendRight(
271271
insertion_point,
272-
`\n${indent}export {\n${indent}\t${state.props.map((prop) => `${prop.local},`).join(`\n${indent}\t`)}\n${indent}}\n`
272+
`\n${indent}export {${state.props.reduce((acc, prop) => (prop.slot_name ? acc : `${acc}\n${indent}\t${prop.local},`), '')}\n${indent}}\n`
273273
);
274274
}
275275

packages/svelte/tests/migrate/samples/accessors/output.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
test,
2020
count,
2121
stuff,
22-
cool,
2322
}
2423
</script>
2524

0 commit comments

Comments
 (0)