We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c404ac commit c646f97Copy full SHA for c646f97
packages/svelte/src/compiler/print/index.js
@@ -300,7 +300,13 @@ const visitors = {
300
301
context.visit(node.consequent);
302
if (node.alternate !== null) {
303
- if (!(node.alternate.type === 'IfBlock' && node.alternate.elseif)) {
+ if (
304
+ !(
305
+ node.alternate.nodes.length === 1 &&
306
+ node.alternate.nodes[0].type === 'IfBlock' &&
307
+ node.alternate.nodes[0].elseif
308
+ )
309
+ ) {
310
context.write('{:else}');
311
}
312
context.visit(node.alternate);
0 commit comments