File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
packages/svelte/src/compiler/print Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -299,18 +299,20 @@ const visitors = {
299299 context . write ( '}' ) ;
300300
301301 context . visit ( node . consequent ) ;
302- if ( node . alternate !== null ) {
303- 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 ) ;
302+ }
303+ if ( node . alternate !== null ) {
304+ if (
305+ ! (
306+ node . alternate . nodes . length === 1 &&
307+ node . alternate . nodes [ 0 ] . type === 'IfBlock' &&
308+ node . alternate . nodes [ 0 ] . elseif
309+ )
310+ ) {
311+ context . write ( '{:else}' ) ;
313312 }
313+ context . visit ( node . alternate ) ;
314+ }
315+ if ( ! node . elseif ) {
314316 context . write ( '{/if}' ) ;
315317 }
316318 } ,
You can’t perform that action at this time.
0 commit comments