@dharmax/state-router 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dharmax/state-router",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "A cute and tight router and application state controller",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -88,8 +88,8 @@ export class StateManager {
88
88
  }
89
89
 
90
90
  // check if the state change was declined by any change authority and if so - don't do it and return false
91
- const changeConfirmations = await Promise.all(this.changeAuthorities.map( authority => authority(newState) ))
92
- if (changeConfirmations.find( c => c === false))
91
+ const changeConfirmations = await Promise.all(this.changeAuthorities.map(authority => authority(newState)))
92
+ if (changeConfirmations.includes(false))
93
93
  return false
94
94
 
95
95
  // perform the change