From: 山吹色御守 <85992002+KazariEX@users.noreply.github.com> Date: Fri, 20 Sep 2024 08:44:14 +0000 (+0800) Subject: fix(compiler-sfc): initialize scope with null prototype object (#11963) X-Git-Tag: v3.5.7~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=215e15407294bf667261360218f975b88c99c2e5;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-sfc): initialize scope with null prototype object (#11963) --- 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()