Skip to content

Commit

Permalink
Better hasKey
Browse files Browse the repository at this point in the history
  • Loading branch information
Mechazawa committed Aug 22, 2018
1 parent 234837a commit f3fd7d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/Enum.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Enum {
* @returns {boolean} - key exists
*/
hasKey(name) {
return this.keys().includes(name);
return name in this;
}

/**
Expand Down

0 comments on commit f3fd7d7

Please sign in to comment.