summaryrefslogtreecommitdiff
path: root/lib/internal/process/warning.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/process/warning.js')
-rw-r--r--lib/internal/process/warning.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/internal/process/warning.js b/lib/internal/process/warning.js
index 67a553e21a..cf744cf0d5 100644
--- a/lib/internal/process/warning.js
+++ b/lib/internal/process/warning.js
@@ -1,5 +1,9 @@
'use strict';
+const {
+ ArrayIsArray,
+} = primordials;
+
const { ERR_INVALID_ARG_TYPE } = require('internal/errors').codes;
// Lazily loaded
@@ -84,7 +88,7 @@ function onWarning(warning) {
// process.emitWarning(str[, options])
function emitWarning(warning, type, code, ctor, now) {
let detail;
- if (type !== null && typeof type === 'object' && !Array.isArray(type)) {
+ if (type !== null && typeof type === 'object' && !ArrayIsArray(type)) {
ctor = type.ctor;
code = type.code;
if (typeof type.detail === 'string')