chore: Simplify model save codepath, prevents text from being sent ever when collab editing enabled
This commit is contained in:
@@ -106,11 +106,14 @@ export default abstract class BaseStore<T extends BaseModel> {
|
||||
this.data.delete(id);
|
||||
}
|
||||
|
||||
save(params: Partial<T>): Promise<T> {
|
||||
save(
|
||||
params: Partial<T>,
|
||||
options?: Record<string, string | boolean | number | undefined>
|
||||
): Promise<T> {
|
||||
if (params.id) {
|
||||
return this.update(params);
|
||||
return this.update(params, options);
|
||||
}
|
||||
return this.create(params);
|
||||
return this.create(params, options);
|
||||
}
|
||||
|
||||
get(id: string): T | undefined {
|
||||
|
||||
Reference in New Issue
Block a user