mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
lib: enforce use of Array from primordials
PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
parent
5904dfcc9c
commit
141a6e34ee
48 changed files with 139 additions and 68 deletions
|
@ -1,6 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const {
|
||||
ArrayIsArray,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
ObjectKeys,
|
||||
|
@ -335,7 +336,7 @@ class PerformanceObserver extends AsyncResource {
|
|||
if (typeof options !== 'object' || options === null) {
|
||||
throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);
|
||||
}
|
||||
if (!Array.isArray(options.entryTypes)) {
|
||||
if (!ArrayIsArray(options.entryTypes)) {
|
||||
throw new ERR_INVALID_OPT_VALUE('entryTypes', options);
|
||||
}
|
||||
const entryTypes = options.entryTypes.filter(filterTypes).map(mapTypes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue