]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): initialize scope with null prototype object (#11963)
author山吹色御守 <85992002+KazariEX@users.noreply.github.com>
Fri, 20 Sep 2024 08:44:14 +0000 (16:44 +0800)
committerGitHub <noreply@github.com>
Fri, 20 Sep 2024 08:44:14 +0000 (16:44 +0800)
packages/compiler-sfc/src/script/definePropsDestructure.ts

index 7d848bfecee462a89026670f4aec3f82f8ebf04c..341b537d878f472fda8c03467fa127430bd1ddb6 100644 (file)
@@ -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<Identifier>()