Skip to content

Commit

Permalink
🐛 fixed a bug that caused async actions not getting called in onActio…
Browse files Browse the repository at this point in the history
…n hook
  • Loading branch information
mediv0 committed Oct 14, 2020
1 parent f5f049f commit c77bd19
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,18 @@ export class Bucket {
`);
}
const _asyncDispatch = _fn(_self, _payload);
// if is current dispatch fn doing an asynchronous task, return it to the user
if (isPromise(_asyncDispatch)) {
return _asyncDispatch;
}

this.notifyActions({
name: actionName,
module: this._name,
fullPath: `root/${_name}`,
payload: _payload
});

// if is current dispatch fn doing an asynchronous task, return it to the user
if (isPromise(_asyncDispatch)) {
return _asyncDispatch;
}
}

get state() {
Expand Down

0 comments on commit c77bd19

Please sign in to comment.