mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
change setState() to updateState()
this way we don't wipe out state if we change a different value
This commit is contained in:
+2
-2
@@ -67,8 +67,8 @@ export class AsyncSaga {
|
||||
return Promise.resolve(next);
|
||||
}
|
||||
|
||||
public setState(state: RecursivePartial<RootState>): void {
|
||||
this.state = state;
|
||||
public updateState(state: RecursivePartial<RootState>): void {
|
||||
this.state = { ...this.state, ...state };
|
||||
}
|
||||
|
||||
public async end(): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user