Skip to content

Commit 3cf5b60

Browse files
committed
changed 'instanceof Array' to 'Array.isArray' because instanceof can only validate Arrays created in the same memory frame/window
1 parent b796655 commit 3cf5b60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

convert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var do_convert = require("./doConvert.js")
55

66
module.exports = function convert(arr, result) {
77
var shape = [], c = arr, sz = 1
8-
while(c instanceof Array) {
8+
while(Array.isArray(c)) {
99
shape.push(c.length)
1010
sz *= c.length
1111
c = c[0]

0 commit comments

Comments
 (0)