Commit b5c51fd
util: fix check for Array constructor
In the event an Array is created in a Debug context, the constructor
will be Array, but !== Array. This adds a check
constructor.name === 'Array' to handle edge cases like that.
PR-URL: #3119
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent 546e833 commit b5c51fdCopy full SHA for b5c51fd
File tree
Expand file treeCollapse file tree
2 files changed
+17
-1
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+17
-1
lines changedOpen diff view settings
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
292 | 292 | |
293 | 293 | |
294 | 294 | |
295 | | - |
| 295 | + |
| 296 | + |
| 297 | + |
| 298 | + |
296 | 299 | |
297 | 300 | |
298 | 301 | |
|
Collapse file
test/parallel/test-util-inspect.js
Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js+13Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
26 | 39 | |
27 | 40 | |
28 | 41 | |
|
0 commit comments