From: Evan You Date: Wed, 24 Apr 2024 10:28:49 +0000 (+0800) Subject: fix(runtime-core): use normal object as internal prototype for attrs and slots X-Git-Tag: v3.4.25~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=064e82f5855f30fe0b77fe9b5e4dd22700fd634d;p=thirdparty%2Fvuejs%2Fcore.git 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 --- diff --git a/packages/runtime-core/src/internalObject.ts b/packages/runtime-core/src/internalObject.ts index 0c0c39bef6..8b6ff1724f 100644 --- a/packages/runtime-core/src/internalObject.ts +++ b/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)