mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +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
|
@ -28,8 +28,8 @@ const {
|
|||
ArrayPrototypeJoin,
|
||||
ArrayPrototypeSplice,
|
||||
ArrayPrototypeFilter,
|
||||
ObjectPrototypeHasOwnProperty,
|
||||
ObjectEntries,
|
||||
ObjectHasOwn,
|
||||
RegExpPrototypeTest,
|
||||
SafeArrayIterator,
|
||||
SafeRegExp,
|
||||
|
@ -79,7 +79,7 @@ function fillHeaders(headers, object) {
|
|||
}
|
||||
} else {
|
||||
for (const key in object) {
|
||||
if (!ObjectPrototypeHasOwnProperty(object, key)) {
|
||||
if (!ObjectHasOwn(object, key)) {
|
||||
continue;
|
||||
}
|
||||
appendHeader(headers, key, object[key]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue