refactor(core): Use ObjectHasOwn instead of ObjectPrototypeHasOwnProperty (#18952)

ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
This commit is contained in:
Kenta Moriuchi 2023-05-02 19:15:45 +09:00 committed by GitHub
parent cf893741c3
commit 49eb887cc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 25 additions and 24 deletions

View file

@ -21,7 +21,7 @@ const {
MapPrototypeSet,
MathCeil,
ObjectKeys,
ObjectPrototypeHasOwnProperty,
ObjectHasOwn,
ObjectPrototypeIsPrototypeOf,
Promise,
SafeArrayIterator,
@ -166,7 +166,7 @@ function assertOps(fn) {
const details = [];
for (const key in post.ops) {
if (!ObjectPrototypeHasOwnProperty(post.ops, key)) {
if (!ObjectHasOwn(post.ops, key)) {
continue;
}
const preOp = pre.ops[key] ??