Skip to content

Commit

Permalink
avoid empty else
Browse files Browse the repository at this point in the history
  • Loading branch information
pushkine committed Apr 13, 2020
1 parent 7541167 commit 80e4f6b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compiler/compile/render_dom/wrappers/IfBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,14 +526,17 @@ export default class IfBlockWrapper extends Wrapper {
${name}.c();
${has_transitions && b`@transition_in(${name}, 1);`}
${name}.m(${update_mount_node}, ${anchor});
} else {
}${
(dynamic || has_transitions) &&
`else {
${dynamic && b`${name}.p(#ctx, #dirty);`}
${
has_transitions &&
b`if (${block.renderer.dirty(branch.dependencies)}) {
@transition_in(${name}, 1);
}`
}
}`
}
`;

Expand Down

0 comments on commit 80e4f6b

Please sign in to comment.