fix(core): update
This commit is contained in:
parent
9860e43398
commit
efc5b54d2e
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartstate',
|
name: '@pushrocks/smartstate',
|
||||||
version: '2.0.4',
|
version: '2.0.5',
|
||||||
description: 'a package that handles state in a good way'
|
description: 'a package that handles state in a good way'
|
||||||
}
|
}
|
||||||
|
@ -111,9 +111,11 @@ export class StatePart<TStatePartName, TStatePayload> {
|
|||||||
/**
|
/**
|
||||||
* is executed
|
* is executed
|
||||||
*/
|
*/
|
||||||
public stateSetup(
|
public async stateSetup(
|
||||||
funcArg: (statePartArg?: StatePart<any, TStatePayload>) => Promise<TStatePayload | void>
|
funcArg: (statePartArg?: StatePart<any, TStatePayload>) => Promise<TStatePayload>
|
||||||
) {
|
) {
|
||||||
this.cumulativeDeferred.addPromise(funcArg(this));
|
const resultPromise = funcArg(this);
|
||||||
|
this.cumulativeDeferred.addPromise(resultPromise);
|
||||||
|
this.setState(await resultPromise);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user