check for existence of switch instance before introing - fixes #3054

pull/3110/head
Rich Harris 6 years ago
parent 35001b36cc
commit f2044c4e1c

@ -447,7 +447,7 @@ export default class InlineComponentWrapper extends Wrapper {
`);
block.builders.intro.add_block(deindent`
@transition_in(${name}.$$.fragment, #local);
if (${name}) @transition_in(${name}.$$.fragment, #local);
`);
if (updates.length) {

@ -0,0 +1,5 @@
export default {
test({ component }) {
component.visible = true;
}
};

@ -0,0 +1,7 @@
<script>
export let visible = false;
</script>
{#if visible}
<svelte:component this={null}/>
{/if}
Loading…
Cancel
Save