From d09aa4c02d72b9b275ae87aae53fe835dd3f961b Mon Sep 17 00:00:00 2001 From: sudongyu <976499226@qq.com> Date: Mon, 6 Dec 2021 07:27:33 +0800 Subject: [PATCH] chore: improve local variable originalProp is redundant --- packages/compiler-core/src/utils.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/compiler-core/src/utils.ts b/packages/compiler-core/src/utils.ts index 416cf79e9f9..6e2443ea664 100644 --- a/packages/compiler-core/src/utils.ts +++ b/packages/compiler-core/src/utils.ts @@ -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 (