[IMP] store: return data from committing a mutation

closes #29
This commit is contained in:
Alexandre Kühn
2019-04-15 10:24:08 +02:00
committed by Géry Debongnie
parent 7e7226213a
commit e005090296
2 changed files with 17 additions and 1 deletions
+2 -1
View File
@@ -74,7 +74,7 @@ export class Store extends EventBus {
this._isMutating = true;
this.observer.allowMutations = true;
this.mutations[type].call(
const res = this.mutations[type].call(
null,
{
commit: this.commit.bind(this),
@@ -103,6 +103,7 @@ export class Store extends EventBus {
});
}
this._commitLevel--;
return res;
}
}