|
|
|
@ -441,6 +441,7 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
|
`if (${name}) ${name}.m(${initial_mount_node}, ${anchor_node});`
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!branch.dependencies || branch.dependencies.length > 0) {
|
|
|
|
|
const update_mount_node = this.get_update_mount_node(anchor);
|
|
|
|
|
|
|
|
|
|
const enter = dynamic
|
|
|
|
@ -461,12 +462,10 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
|
${name}.c();
|
|
|
|
|
${has_transitions && `@transition_in(${name}, 1);`}
|
|
|
|
|
${name}.m(${update_mount_node}, ${anchor});
|
|
|
|
|
${has_transitions && `} else {
|
|
|
|
|
@transition_in(${name}, 1);`}
|
|
|
|
|
}
|
|
|
|
|
} ${has_transitions && `else @transition_in(${name}, 1);`}
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
if (branch.snippet && branch.dependencies.length) {
|
|
|
|
|
if (branch.snippet) {
|
|
|
|
|
block.builders.update.add_block(`if (${branch.dependencies.map(n => `changed.${n}`).join(' || ')}) ${branch.condition} = ${branch.snippet}`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -494,6 +493,7 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
|
}
|
|
|
|
|
`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
block.builders.destroy.add_line(`${if_name}${name}.d(${detaching});`);
|
|
|
|
|
}
|
|
|
|
|