[IMP] store: return data from dispatching an action

This commit is contained in:
Alexandre Kühn
2019-08-19 15:42:18 +02:00
committed by Géry Debongnie
parent cd9cac1246
commit ab08e84bff
2 changed files with 31 additions and 6 deletions
+1 -6
View File
@@ -99,12 +99,7 @@ export class Store extends EventBus {
},
...payload
);
if (result instanceof Promise) {
return new Promise((resolve, reject) => {
result.then(() => resolve());
result.catch(reject);
});
}
return result;
}
commit(type: string, ...payload: any): any {