From 215e15407294bf667261360218f975b88c99c2e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:44:14 +0800 Subject: [PATCH] fix(compiler-sfc): initialize scope with null prototype object (#11963) --- 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 7d848bfece..341b537d87 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() -- 2.47.2