fix: shared context

This commit is contained in:
chenos 2025-06-23 15:23:52 +08:00
parent 951380a27d
commit 62148c7205
2 changed files with 2 additions and 3 deletions

View File

@ -851,8 +851,7 @@ export class FlowModel<Structure extends { parent?: any; subModels?: any } = Def
}
public setSharedContext(ctx: Record<string, any>) {
this._sharedContext = ctx;
// this._sharedContext = { ...this._sharedContext, ...ctx };
this._sharedContext = { ...this._sharedContext, ...ctx };
}
public getSharedContext() {

View File

@ -121,7 +121,7 @@ export class ForkFlowModel<TMaster extends FlowModel = FlowModel> {
}
public setSharedContext(ctx: Record<string, any>) {
this['_sharedContext'] = ctx;
this['_sharedContext'] = { ...this['_sharedContext'], ...ctx };
}
public getSharedContext() {