diff --git a/src/compile/render-dom/wrappers/InlineComponent/index.ts b/src/compile/render-dom/wrappers/InlineComponent/index.ts index 4abb81ea49..327eee59cf 100644 --- a/src/compile/render-dom/wrappers/InlineComponent/index.ts +++ b/src/compile/render-dom/wrappers/InlineComponent/index.ts @@ -63,7 +63,7 @@ export default class InlineComponentWrapper extends Wrapper { }); this.var = ( - this.node.name === 'svelte:self' ? '__svelte:self__' : // TODO conflict-proof this + this.node.name === 'svelte:self' ? renderer.component.name : this.node.name === 'svelte:component' ? 'switch_instance' : this.node.name ).toLowerCase(); @@ -452,7 +452,7 @@ export default class InlineComponentWrapper extends Wrapper { block.builders.destroy.addLine(`if (${name}) ${name}.$destroy(${parentNode ? '' : 'detach'});`); } else { const expression = this.node.name === 'svelte:self' - ? component.name + ? '__svelte:self__' // TODO conflict-proof this : component.qualify(this.node.name); block.builders.init.addBlock(deindent`