refactor: replace Object.prototype.hasOwnProperty() with Object.hasOwn() (#38929)
This commit is contained in:
parent
09669f9d21
commit
607e71d563
11 changed files with 13 additions and 17 deletions
|
@ -21,7 +21,7 @@ v8Util.setHiddenValue(global, 'Buffer', Buffer);
|
|||
// The process object created by webpack is not an event emitter, fix it so
|
||||
// the API is more compatible with non-sandboxed renderers.
|
||||
for (const prop of Object.keys(EventEmitter.prototype) as (keyof typeof process)[]) {
|
||||
if (Object.prototype.hasOwnProperty.call(process, prop)) {
|
||||
if (Object.hasOwn(process, prop)) {
|
||||
delete process[prop];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue