Skip to content

Commit 2398d85

Browse files
author
weitang.lin
committed
chore: splitNode won't be null
1 parent d6c4b7b commit 2398d85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/router-plugin/src/core/code-splitter/compilers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ export function compileCodeSplitVirtualRoute(
620620
console.info('Unexpected splitNode type:', splitNode)
621621
throw new Error(`Unexpected splitNode type ☝️: ${splitNode.type}`)
622622
}
623-
} else if (splitNode === undefined) {
623+
} else {
624+
// handle the case where splitNode === undefined
624625
programPath.pushContainer(
625626
'body',
626627
t.variableDeclaration('const', [

0 commit comments

Comments
 (0)