fix: Wrap websocket handlers in action
Separate documents.archive
This commit is contained in:
@@ -100,18 +100,6 @@ export default abstract class BaseStore<T extends BaseModel> {
|
||||
return item;
|
||||
};
|
||||
|
||||
@action
|
||||
patch = (item: PartialWithId<T> | T): T | undefined => {
|
||||
const existingModel = this.data.get(item.id);
|
||||
|
||||
if (existingModel) {
|
||||
existingModel.updateFromJson(item);
|
||||
return existingModel;
|
||||
}
|
||||
|
||||
return;
|
||||
};
|
||||
|
||||
@action
|
||||
remove(id: string): void {
|
||||
this.data.delete(id);
|
||||
|
||||
Reference in New Issue
Block a user