chore: fix hoistStatic exhaustive check

This commit is contained in:
Evan You 2020-02-14 16:41:55 -05:00
parent 96605b79a3
commit 66b5f0b480
2 changed files with 4 additions and 0 deletions

View File

@ -597,6 +597,9 @@ function genNode(node: CodegenNode | symbol | string, context: CodegenContext) {
break break
/* istanbul ignore next */ /* istanbul ignore next */
case NodeTypes.IF_BRANCH:
// noop
break
default: default:
if (__DEV__) { if (__DEV__) {
assert(false, `unhandled codegen node type: ${(node as any).type}`) assert(false, `unhandled codegen node type: ${(node as any).type}`)

View File

@ -143,6 +143,7 @@ export function isStaticNode(
return true return true
case NodeTypes.IF: case NodeTypes.IF:
case NodeTypes.FOR: case NodeTypes.FOR:
case NodeTypes.IF_BRANCH:
return false return false
case NodeTypes.INTERPOLATION: case NodeTypes.INTERPOLATION:
case NodeTypes.TEXT_CALL: case NodeTypes.TEXT_CALL: