Skip to content

Commit

Permalink
refactor(middleware): lazy fetch bail value
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Apr 1, 2017
1 parent 93dc84e commit 6666f99
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Middleware.js
Expand Up @@ -15,7 +15,6 @@ class Middleware {

constructor (context, fnWrapper) {
this._context = context
this._bail = $.bail
this._fnWrapper = fnWrapper
this._stack = []
this.errorsStack = []
Expand All @@ -31,7 +30,7 @@ class Middleware {
* @param {Function}
*/
_internalRejection (index, resolve, reject, error) {
if (this._bail) {
if ($.bail) {
reject(error)
return
}
Expand Down

0 comments on commit 6666f99

Please sign in to comment.