aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/internal/util/inspect.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js
index c3cad0e2f4..6ec27b9d1d 100644
--- a/lib/internal/util/inspect.js
+++ b/lib/internal/util/inspect.js
@@ -475,7 +475,7 @@ function noPrototypeIterator(ctx, value, recurseTimes) {
} else if (Array.isArray(value)) {
const clazz = Object.getPrototypeOf(value) ||
clazzWithNullPrototype(Array, 'Array');
- newVal = new clazz(value.length || 0);
+ newVal = new clazz(value.length);
} else if (isTypedArray(value)) {
let clazz = Object.getPrototypeOf(value);
if (!clazz) {