|
|
@ -45,8 +45,8 @@ export default class Component extends Node {
|
|
|
|
|
|
|
|
|
|
|
|
this.var = block.getUniqueName(
|
|
|
|
this.var = block.getUniqueName(
|
|
|
|
(
|
|
|
|
(
|
|
|
|
(this.name === ':Self' || this.name === 'svelte:self') ? this.generator.name :
|
|
|
|
this.name === 'svelte:self' ? this.generator.name :
|
|
|
|
(this.name === ':Component' || this.name === 'svelte:component') ? 'switch_instance' :
|
|
|
|
this.name === 'svelte:component' ? 'switch_instance' :
|
|
|
|
this.name
|
|
|
|
this.name
|
|
|
|
).toLowerCase()
|
|
|
|
).toLowerCase()
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -293,7 +293,7 @@ export default class Component extends Node {
|
|
|
|
`;
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (this.name === ':Component' || this.name === 'svelte:component') {
|
|
|
|
if (this.name === 'svelte:component') {
|
|
|
|
const switch_value = block.getUniqueName('switch_value');
|
|
|
|
const switch_value = block.getUniqueName('switch_value');
|
|
|
|
const switch_props = block.getUniqueName('switch_props');
|
|
|
|
const switch_props = block.getUniqueName('switch_props');
|
|
|
|
|
|
|
|
|
|
|
@ -387,7 +387,7 @@ export default class Component extends Node {
|
|
|
|
|
|
|
|
|
|
|
|
block.builders.destroy.addLine(`if (${name}) ${name}.destroy(false);`);
|
|
|
|
block.builders.destroy.addLine(`if (${name}) ${name}.destroy(false);`);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
const expression = (this.name === ':Self' || this.name === 'svelte:self')
|
|
|
|
const expression = this.name === 'svelte:self'
|
|
|
|
? generator.name
|
|
|
|
? generator.name
|
|
|
|
: `%components-${this.name}`;
|
|
|
|
: `%components-${this.name}`;
|
|
|
|
|
|
|
|
|
|
|
|