Skip to content

Commit

Permalink
Merge pull request #99 from lucasfcosta/not-call-getter-array-stringTag
Browse files Browse the repository at this point in the history
Do not call getter when checking for Symbol.toStringTag in obj
  • Loading branch information
vieiralucas authored Apr 20, 2017
2 parents f63b62b + 17fce2a commit c7895e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module.exports = function typeDetect(obj) {
*/
if (
Array.isArray(obj) &&
(symbolToStringTagExists === false || typeof obj[Symbol.toStringTag] === 'undefined')
(symbolToStringTagExists === false || !(Symbol.toStringTag in obj))
) {
return 'Array';
}
Expand Down

0 comments on commit c7895e4

Please sign in to comment.