mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 13:44:08 +00:00
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:
parent
cf893741c3
commit
49eb887cc6
10 changed files with 25 additions and 24 deletions
|
@ -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] ??
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue