From 8d8881b18faea65689a3c70fe89cafa6a5383d2f Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Tue, 24 Apr 2018 08:11:43 -0400 Subject: [PATCH] some instead of includes --- packages/hooks/src/createHasHook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hooks/src/createHasHook.js b/packages/hooks/src/createHasHook.js index 1ec8d33..199cda9 100644 --- a/packages/hooks/src/createHasHook.js +++ b/packages/hooks/src/createHasHook.js @@ -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;