Skip to content
This repository has been archived by the owner on Jul 9, 2018. It is now read-only.

Commit

Permalink
some instead of includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed Apr 24, 2018
1 parent a04303b commit 8d8881b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hooks/src/createHasHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function createHasHook( hooks ) {
if ( 'undefined' !== typeof namespace ){
return hookName in hooks &&
hooks[ hookName ].handlers &&
hooks[ hookName ].handlers.map( hook => hook['namespace'] ).includes( namespace );
hooks[ hookName ].handlers.some( hook => hook['namespace'] === namespace );
}

return hookName in hooks;
Expand Down

0 comments on commit 8d8881b

Please sign in to comment.