Commit 80f7d479 80f7d4799b7e7965bd2a91aa7c4e17123ab8c20f by Nicolas Perriault

use of isType() in Casper.each

1 parent 8723ef39
...@@ -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 }
......