Skip to content

Commit fa613e9

Browse files
author
Jacob Wenger
committed
Merge pull request #8 from mjackson/safe-array
Use safer isArray
2 parents eef41d4 + 6e41d7d commit fa613e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

js/ReactFireMixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var ReactFireMixin;
6262
/*************/
6363
/* Returns true if the inputted object is a JavaScript array */
6464
_isArray: function(obj) {
65-
return (obj && typeof obj === "object" && obj instanceof Array);
65+
return Object.prototype.toString.call(obj) === "[object Array]";
6666
},
6767

6868
/* Converts a Firebase object to a JavaScript array */

js/ReactFireMixin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)