pull/8930/head
Robert Smith 3 years ago
parent 2cddada6de
commit c277e8b2bd

@ -84,13 +84,12 @@ export default function bind_this(component, block, binding, variable) {
}); });
} }
`); `);
if (block.has_outro_method) { if (block.has_outro_method) {
block.chunks.outro.push(b`${callee}(null);` ); block.chunks.outro.push(b`${callee}(null);`);
block.chunks.destroy.push(b`if(#current) { block.chunks.destroy.push(b`if(#current) {
${callee}(null); ${callee}(null);
}`); }`);
} } else {
else {
block.chunks.destroy.push(b`${callee}(null);`); block.chunks.destroy.push(b`${callee}(null);`);
} }
return b`${callee}(${variable});`; return b`${callee}(${variable});`;

@ -9,8 +9,8 @@
} }
</script> </script>
{#if show=="a"} {#if show == 'a'}
<div class="first" bind:this={el} transition:foo>first</div> <div class="first" bind:this={el} transition:foo>first</div>
{:else if show=="b"} {:else if show == 'b'}
<div class="second" bind:this={el} transition:foo>second</div> <div class="second" bind:this={el} transition:foo>second</div>
{/if} {/if}

@ -19,4 +19,4 @@
<div bind:this={yes} out:foo>yes</div> <div bind:this={yes} out:foo>yes</div>
{:else if y} {:else if y}
<div bind:this={no} out:foo>no</div> <div bind:this={no} out:foo>no</div>
{/if} {/if}

Loading…
Cancel
Save