|
|
@ -334,8 +334,12 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
`);
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (dynamic) {
|
|
|
|
} else if (dynamic) {
|
|
|
|
|
|
|
|
if (if_exists_condition) {
|
|
|
|
|
|
|
|
block.chunks.update.push(b`if (${if_exists_condition}) ${name}.p(#ctx, #dirty);`);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
block.chunks.update.push(b`${name}.p(#ctx, #dirty);`);
|
|
|
|
block.chunks.update.push(b`${name}.p(#ctx, #dirty);`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (if_exists_condition) {
|
|
|
|
if (if_exists_condition) {
|
|
|
|
block.chunks.destroy.push(b`
|
|
|
|
block.chunks.destroy.push(b`
|
|
|
@ -357,7 +361,7 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
parent_node: Identifier,
|
|
|
|
parent_node: Identifier,
|
|
|
|
_parent_nodes: Identifier,
|
|
|
|
_parent_nodes: Identifier,
|
|
|
|
dynamic,
|
|
|
|
dynamic,
|
|
|
|
{ name, anchor, has_else, has_transitions },
|
|
|
|
{ name, anchor, has_else, has_transitions, if_exists_condition },
|
|
|
|
detaching
|
|
|
|
detaching
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
const select_block_type = this.renderer.component.get_unique_name(`select_block_type`);
|
|
|
|
const select_block_type = this.renderer.component.get_unique_name(`select_block_type`);
|
|
|
@ -486,8 +490,12 @@ export default class IfBlockWrapper extends Wrapper {
|
|
|
|
`);
|
|
|
|
`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (dynamic) {
|
|
|
|
} else if (dynamic) {
|
|
|
|
|
|
|
|
if (if_exists_condition) {
|
|
|
|
|
|
|
|
block.chunks.update.push(b`if (${if_exists_condition}) ${name}.p(#ctx, #dirty);`);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
block.chunks.update.push(b`${name}.p(#ctx, #dirty);`);
|
|
|
|
block.chunks.update.push(b`${name}.p(#ctx, #dirty);`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
block.chunks.destroy.push(
|
|
|
|
block.chunks.destroy.push(
|
|
|
|
if_current_block_type_index(b`${if_blocks}[${current_block_type_index}].d(${detaching});`)
|
|
|
|
if_current_block_type_index(b`${if_blocks}[${current_block_type_index}].d(${detaching});`)
|
|
|
|