From b3c241094f3da586349314549edb5ad5e2017903 Mon Sep 17 00:00:00 2001 From: Vadim Kruglov Date: Tue, 14 May 2024 19:49:33 +0700 Subject: [PATCH] refactor(compiler-core): remove redundant if statement --- packages/compiler-core/src/transforms/vBind.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/compiler-core/src/transforms/vBind.ts b/packages/compiler-core/src/transforms/vBind.ts index f5c06b870ea..c3140699475 100644 --- a/packages/compiler-core/src/transforms/vBind.ts +++ b/packages/compiler-core/src/transforms/vBind.ts @@ -42,12 +42,10 @@ export const transformBind: DirectiveTransform = (dir, _node, context) => { // same-name shorthand - :arg is expanded to :arg="arg" if (!exp) { - if (!exp) { - const returned = transformBindShorthand(dir, context) - if (returned) return returned + const returned = transformBindShorthand(dir, context) + if (returned) return returned - exp = dir.exp! - } + exp = dir.exp! } if (arg.type !== NodeTypes.SIMPLE_EXPRESSION) {