]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): use normal object as internal prototype for attrs and slots
authorEvan You <yyx990803@gmail.com>
Wed, 24 Apr 2024 10:28:49 +0000 (18:28 +0800)
committerEvan You <yyx990803@gmail.com>
Wed, 24 Apr 2024 10:28:49 +0000 (18:28 +0800)
to allow use of hasOwnProperty()
ref https://github.com/vuejs/core/commit/6df53d85a207986128159d88565e6e7045db2add#r141304923

packages/runtime-core/src/internalObject.ts

index 0c0c39bef6d64fea17bd07cf16240ec40bcb6657..8b6ff1724f23f77ef37897b889863b3fa9e2833b 100644 (file)
@@ -4,7 +4,7 @@
  * `Object.getPrototypeOf`. This is more performant than defining a
  * non-enumerable property. (one of the optimizations done for ssr-benchmark)
  */
-const internalObjectProto = Object.create(null)
+const internalObjectProto = {}
 
 export const createInternalObject = () => Object.create(internalObjectProto)