@dharmax/state-router 1.2.0 → 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.
@@ -57,7 +57,7 @@ export class StateManager {
57
57
  }
58
58
  // check if the state change was declined by any change authority and if so - don't do it and return false
59
59
  const changeConfirmations = await Promise.all(this.changeAuthorities.map(a => a(newState)));
60
- if (changeConfirmations.find(c => c === false))
60
+ if (changeConfirmations.includes(false))
61
61
  return false;
62
62
  // perform the change
63
63
  this.previousState = this.appState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dharmax/state-router",
3
- "version": "1.2.0",
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