Kaynağa Gözat

fix(runtime-core): use normal object as internal prototype for attrs and slots

to allow use of hasOwnProperty()
ref https://github.com/vuejs/core/commit/6df53d85a207986128159d88565e6e7045db2add#r141304923
Evan You 2 yıl önce
ebeveyn
işleme
064e82f585
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      packages/runtime-core/src/internalObject.ts

+ 1 - 1
packages/runtime-core/src/internalObject.ts

@@ -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)