use of isType() in Casper.each
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -292,7 +292,7 @@ | ... | @@ -292,7 +292,7 @@ |
292 | * @return Casper | 292 | * @return Casper |
293 | */ | 293 | */ |
294 | each: function(array, fn) { | 294 | each: function(array, fn) { |
295 | if (array.constructor !== Array) { | 295 | if (!isType(array, "array")) { |
296 | self.log("each() only works with arrays", "error"); | 296 | self.log("each() only works with arrays", "error"); |
297 | return this; | 297 | return this; |
298 | } | 298 | } | ... | ... |
-
Please register or sign in to post a comment