`Object.hasOwn()` hinders reactivity
Vue version
3.3.4
Link to minimal reproduction
Steps to reproduce
Create a reactive object with a property. Within a dependency (computed/watch), check the existence of a property within the reactive variable via Object.hasOwn
. Now change the value of the property.
What is expected?
The dependency is supposed to trigger upon change of the property.
What is actually happening?
The dependency does not trigger upon change of the property.
System Info
System:
OS: Windows 10 10.0.22621
CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900K
Memory: 49.42 GB / 63.75 GB
Binaries:
Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
npm: 9.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.36)
Internet Explorer: 11.0.22621.1
Any additional comments?
The static method Object.hasOwn
is supposed to be the longtime replacement for Object.prototype.hasOwnProperty
. Unfortunately, this hinders reactivity with reactive properties. This issue also regards Object.prototype.hasOwnProperty.call
as well as Object.hasOwnProperty.call
similar to https://github.com/vuejs/core/issues/9177