From 064e82f5855f30fe0b77fe9b5e4dd22700fd634d Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 24 Apr 2024 18:28:49 +0800 Subject: [PATCH] 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 --- packages/runtime-core/src/internalObject.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/internalObject.ts b/packages/runtime-core/src/internalObject.ts index 0c0c39bef6d..8b6ff1724f2 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)