fix(core): update
This commit is contained in:
@ -34,7 +34,11 @@ export class StatePart<TStatePartName, TStatePayload> {
|
||||
const createStateHash = (stateArg: any) => {
|
||||
return plugins.isohash.sha256FromString(plugins.smartjson.stringify(stateArg));
|
||||
};
|
||||
if (this.stateStore && this.lastStateNotificationPayloadHash && createStateHash(this.stateStore) === createStateHash(this.lastStateNotificationPayloadHash)) {
|
||||
if (
|
||||
this.stateStore &&
|
||||
this.lastStateNotificationPayloadHash &&
|
||||
createStateHash(this.stateStore) === createStateHash(this.lastStateNotificationPayloadHash)
|
||||
) {
|
||||
return;
|
||||
} else {
|
||||
this.lastStateNotificationPayloadHash = this.stateStore;
|
||||
@ -105,9 +109,11 @@ export class StatePart<TStatePartName, TStatePayload> {
|
||||
}
|
||||
|
||||
/**
|
||||
* is executed
|
||||
* is executed
|
||||
*/
|
||||
public stateSetup(funcArg: (statePartArg?: StatePart<any, TStatePayload>) => Promise<TStatePayload | void>) {
|
||||
public stateSetup(
|
||||
funcArg: (statePartArg?: StatePart<any, TStatePayload>) => Promise<TStatePayload | void>
|
||||
) {
|
||||
this.cumulativeDeferred.addPromise(funcArg(this));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user