Skip to content

Commit 80e4f6b

Browse files
committed
avoid empty else
1 parent 7541167 commit 80e4f6b

File tree

1 file changed

+4
-1
lines changed
  • src/compiler/compile/render_dom/wrappers

1 file changed

+4
-1
lines changed

src/compiler/compile/render_dom/wrappers/IfBlock.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,17 @@ export default class IfBlockWrapper extends Wrapper {
526526
${name}.c();
527527
${has_transitions && b`@transition_in(${name}, 1);`}
528528
${name}.m(${update_mount_node}, ${anchor});
529-
} else {
529+
}${
530+
(dynamic || has_transitions) &&
531+
`else {
530532
${dynamic && b`${name}.p(#ctx, #dirty);`}
531533
${
532534
has_transitions &&
533535
b`if (${block.renderer.dirty(branch.dependencies)}) {
534536
@transition_in(${name}, 1);
535537
}`
536538
}
539+
}`
537540
}
538541
`;
539542

0 commit comments

Comments
 (0)