From 71a2db4e11df71f555a9a63f55327fd27bfc1c52 Mon Sep 17 00:00:00 2001 From: KazariEX <1364035137@qq.com> Date: Wed, 18 Sep 2024 17:48:31 +0800 Subject: [PATCH] fix(compiler-sfc): initialize scope with null prototype object --- packages/compiler-sfc/src/script/definePropsDestructure.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/src/script/definePropsDestructure.ts b/packages/compiler-sfc/src/script/definePropsDestructure.ts index 7d848bfecee..341b537d878 100644 --- a/packages/compiler-sfc/src/script/definePropsDestructure.ts +++ b/packages/compiler-sfc/src/script/definePropsDestructure.ts @@ -102,7 +102,7 @@ export function transformDestructuredProps( return } - const rootScope: Scope = {} + const rootScope: Scope = Object.create(null) const scopeStack: Scope[] = [rootScope] let currentScope: Scope = rootScope const excludedIds = new WeakSet()