Comparing version 1.0.6 to 1.0.7
@@ -136,10 +136,14 @@ class KruxModule { | ||
return (action) => { | ||
next(action); | ||
let res = _this.onMiddleware(store, action); | ||
return Promise.resolve( | ||
_this.onMiddleware(store, action) | ||
).then((data) => { | ||
if(res) { | ||
return Promise.resolve(res).then((data) => { | ||
next(action); | ||
return data; | ||
}); | ||
return data; | ||
}); | ||
} | ||
else { | ||
return next(action); | ||
} | ||
}; | ||
@@ -146,0 +150,0 @@ }; |
{ | ||
"name": "kpdux", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"author": "Kris Papercut <kearis666@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
9209
274