Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eeb4715

Browse filesBrowse files
rahulshuklab4ucodebytere
authored andcommitted
util: remove unreachable branch
Re-defining the array length will always set to 0. Hence, the code branch can not be covered. PR-URL: #24447 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 6bd055f commit eeb4715
Copy full SHA for eeb4715

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/util/inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ function noPrototypeIterator(ctx, value, recurseTimes) {
437437
} else if (Array.isArray(value)) {
438438
const clazz = Object.getPrototypeOf(value) ||
439439
clazzWithNullPrototype(Array, 'Array');
440-
newVal = new clazz(value.length || 0);
440+
newVal = new clazz(value.length);
441441
} else if (isTypedArray(value)) {
442442
let clazz = Object.getPrototypeOf(value);
443443
if (!clazz) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.