File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed
Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -336,24 +336,24 @@ function staticAnalyseIfIsland(ast) {
336336 }
337337
338338 // // TODO: Enable once named exports are also handled
339- // if (childNode.type == 'FunctionDeclaration') {
340- // if (isFunctionIsland(childNode)) {
341- // isIsland = true
342- // }
343- // }
344-
345- // if (childNode.type == 'VariableDeclaration') {
346- // childNode.declarations.forEach(dec => {
347- // if (
348- // dec.init === 'ArrowFunctionExpression' ||
349- // dec.init === 'FunctionExpression'
350- // ) {
351- // if (isFunctionIsland(dec.init)) {
352- // isIsland = true
353- // }
354- // }
355- // })
356- // }
339+ if ( childNode . type == 'FunctionDeclaration' ) {
340+ if ( isFunctionIsland ( childNode ) ) {
341+ isIsland = true
342+ }
343+ }
344+
345+ if ( childNode . type == 'VariableDeclaration' ) {
346+ childNode . declarations . forEach ( dec => {
347+ if (
348+ dec . init === 'ArrowFunctionExpression' ||
349+ dec . init === 'FunctionExpression'
350+ ) {
351+ if ( isFunctionIsland ( dec . init ) ) {
352+ isIsland = true
353+ }
354+ }
355+ } )
356+ }
357357 } )
358358
359359 return isIsland
You can’t perform that action at this time.
0 commit comments