File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
packages/svelte/src/compiler/phases/3-transform/server/visitors Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,13 @@ import { block_close, block_open } from './shared/utils.js';
1010 * @param {ComponentContext } context
1111 */
1212export function IfBlock ( node , context ) {
13- let index = 0 ;
14-
1513 const consequent = /** @type {BlockStatement } */ ( context . visit ( node . consequent ) ) ;
1614 consequent . body . unshift ( b . stmt ( b . assignment ( '+=' , b . id ( '$$payload.out' ) , block_open ) ) ) ;
1715 let if_statement = b . if ( /** @type {Expression } */ ( context . visit ( node . test ) ) , consequent ) ;
1816
1917 context . state . template . push ( if_statement , block_close ) ;
2018
19+ let index = 1 ;
2120 let alt = node . alternate ;
2221 while ( alt && alt . nodes . length === 1 && alt . nodes [ 0 ] . type === 'IfBlock' && alt . nodes [ 0 ] . elseif ) {
2322 const elseif = alt . nodes [ 0 ] ;
You can’t perform that action at this time.
0 commit comments