Skip to content

Commit

Permalink
Merge pull request #3110 from sveltejs/gh-3054
Browse files Browse the repository at this point in the history
check for existence of switch instance before introing
  • Loading branch information
Rich-Harris authored Jun 25, 2019
2 parents 33b756c + f2044c4 commit 1685d87
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 1685d87

Please sign in to comment.