Skip to content

Commit

Permalink
chore: fix hoistStatic exhaustive check
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Feb 14, 2020
1 parent 96605b7 commit 66b5f0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/compiler-core/src/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,9 @@ function genNode(node: CodegenNode | symbol | string, context: CodegenContext) {
break

/* istanbul ignore next */
case NodeTypes.IF_BRANCH:
// noop
break
default:
if (__DEV__) {
assert(false, `unhandled codegen node type: ${(node as any).type}`)
Expand Down
1 change: 1 addition & 0 deletions packages/compiler-core/src/transforms/hoistStatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export function isStaticNode(
return true
case NodeTypes.IF:
case NodeTypes.FOR:
case NodeTypes.IF_BRANCH:
return false
case NodeTypes.INTERPOLATION:
case NodeTypes.TEXT_CALL:
Expand Down

0 comments on commit 66b5f0b

Please sign in to comment.