]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix hoistStatic exhaustive check
authorEvan You <yyx990803@gmail.com>
Fri, 14 Feb 2020 21:41:55 +0000 (16:41 -0500)
committerEvan You <yyx990803@gmail.com>
Fri, 14 Feb 2020 21:41:55 +0000 (16:41 -0500)
packages/compiler-core/src/codegen.ts
packages/compiler-core/src/transforms/hoistStatic.ts

index 856be6b9ab1b30fb900afcfdd8c3cb9b78fdbbc2..4d0b7298a292205661fb1056c7a65f3c0d757317 100644 (file)
@@ -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}`)
index 968fc59120d697d28b32ff6b0fcea1678d4002c8..a25691643cf29faa43949b92ef4224bf0920756b 100644 (file)
@@ -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: