]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: remove redundant variable declaration (#5053)
authorForzen FIsh <76603360+sudongyuer@users.noreply.github.com>
Mon, 6 Dec 2021 04:10:58 +0000 (12:10 +0800)
committerGitHub <noreply@github.com>
Mon, 6 Dec 2021 04:10:58 +0000 (23:10 -0500)
packages/compiler-core/src/utils.ts

index 416cf79e9f9a3ae4b4436b5f6e4b10874b26794d..6e2443ea664ea06805e5ebab51ca1226917c1a06 100644 (file)
@@ -363,9 +363,6 @@ export function injectProp(
   context: TransformContext
 ) {
   let propsWithInjection: ObjectExpression | CallExpression | undefined
-  const originalProps =
-    node.type === NodeTypes.VNODE_CALL ? node.props : node.arguments[2]
-
   /**
    * 1. mergeProps(...)
    * 2. toHandlers(...)
@@ -374,7 +371,7 @@ export function injectProp(
    *
    * we need to get the real props before normalization
    */
-  let props = originalProps
+  let props = node.type === NodeTypes.VNODE_CALL ? node.props : node.arguments[2]
   let callPath: CallExpression[] = []
   let parentCall: CallExpression | undefined
   if (