deconflict variable for inline component instance

pull/4792/head
Conduitry 5 years ago
parent c743e72a1e
commit 592b55088c

@ -64,14 +64,13 @@ export default class InlineComponentWrapper extends Wrapper {
} }
}); });
this.var = { this.var = block.get_unique_name(
type: 'Identifier', (
name: (
this.node.name === 'svelte:self' ? renderer.component.name.name : this.node.name === 'svelte:self' ? renderer.component.name.name :
this.node.name === 'svelte:component' ? 'switch_instance' : this.node.name === 'svelte:component' ? 'switch_instance' :
sanitize(this.node.name) sanitize(this.node.name)
).toLowerCase() ).toLowerCase()
}; );
if (this.node.children.length) { if (this.node.children.length) {
this.node.lets.forEach(l => { this.node.lets.forEach(l => {

Loading…
Cancel
Save