Skip to content

Commit

Permalink
Simplified identify function now that es6-set has a constructor.name …
Browse files Browse the repository at this point in the history
…of 'Set'.
  • Loading branch information
papandreou committed Jan 19, 2016
1 parent 4f640d4 commit 81d095a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/unexpected-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ module.exports = {
identify: function (obj) {
return (
obj instanceof SetOrPolyfill ||
(obj && (obj.constructor && obj.constructor.name === 'Set') ||
(typeof obj.toString === 'function' && obj.toString() === '[object Set]'))
(obj && obj.constructor && obj.constructor.name === 'Set')
);
},
equal: function (a, b) {
Expand Down

0 comments on commit 81d095a

Please sign in to comment.