Skip to content

Commit

Permalink
check for existence of switch instance before introing - fixes #3054
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jun 25, 2019
1 parent 35001b3 commit f2044c4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
test({ component }) {
component.visible = true;
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
export let visible = false;
</script>

{#if visible}
<svelte:component this={null}/>
{/if}

0 comments on commit f2044c4

Please sign in to comment.