Skip to content

Commit

Permalink
then(success, fail)
Browse files Browse the repository at this point in the history
  • Loading branch information
goatslacker committed Jun 20, 2015
1 parent e2a7427 commit 6f6bb05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/alt/store/StoreMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ const StoreMixin = {
loadCounter += 1
/* istanbul ignore else */
if (spec.loading) spec.loading(intercept(null, spec.loading, args))
return spec.remote(state, ...args)
.catch(makeActionHandler(spec.error, 1))
.then(makeActionHandler(spec.success))
return spec.remote(state, ...args).then(
makeActionHandler(spec.success),
makeActionHandler(spec.error, 1)
)
} else {
// otherwise emit the change now
this.emitChange()
Expand Down

0 comments on commit 6f6bb05

Please sign in to comment.