|
|
@ -521,12 +521,7 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
const update_mount_node = this.get_update_mount_node(anchor);
|
|
|
|
const update_mount_node = this.get_update_mount_node(anchor);
|
|
|
|
|
|
|
|
|
|
|
|
const enter = b`
|
|
|
|
const enter = b`
|
|
|
|
if (!${name}) {
|
|
|
|
if (${name}) {
|
|
|
|
${name} = ${branch.block.name}(#ctx);
|
|
|
|
|
|
|
|
${name}.c();
|
|
|
|
|
|
|
|
${has_transitions && b`@transition_in(${name}, 1);`}
|
|
|
|
|
|
|
|
${name}.m(${update_mount_node}, ${anchor});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
${dynamic && b`${name}.p(#ctx, #dirty);`}
|
|
|
|
${dynamic && b`${name}.p(#ctx, #dirty);`}
|
|
|
|
${
|
|
|
|
${
|
|
|
|
has_transitions &&
|
|
|
|
has_transitions &&
|
|
|
@ -534,6 +529,11 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
@transition_in(${name}, 1);
|
|
|
|
@transition_in(${name}, 1);
|
|
|
|
}`
|
|
|
|
}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
${name} = ${branch.block.name}(#ctx);
|
|
|
|
|
|
|
|
${name}.c();
|
|
|
|
|
|
|
|
${has_transitions && b`@transition_in(${name}, 1);`}
|
|
|
|
|
|
|
|
${name}.m(${update_mount_node}, ${anchor});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|