diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-05-02 19:15:45 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 12:15:45 +0200 |
commit | 49eb887cc6325e14211ec4a241ffc4ac98f0f7a9 (patch) | |
tree | 8dec27c42c45b8e0bfaa7d4b886546fbdc942b64 /ext/fetch/20_headers.js | |
parent | cf893741c3206f55eaac1999f50f1018122f7b85 (diff) |
refactor(core): Use `ObjectHasOwn` instead of `ObjectPrototypeHasOwnProperty` (#18952)
ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
Diffstat (limited to 'ext/fetch/20_headers.js')
-rw-r--r-- | ext/fetch/20_headers.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fetch/20_headers.js b/ext/fetch/20_headers.js index 7ec6751fa..89b9e1a2b 100644 --- a/ext/fetch/20_headers.js +++ b/ext/fetch/20_headers.js @@ -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]); |