chore: Simplify model save codepath, prevents text from being sent ever when collab editing enabled
This commit is contained in:
@@ -20,7 +20,10 @@ export default abstract class BaseModel {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
save = async (params?: Record<string, any>) => {
|
||||
save = async (
|
||||
params?: Record<string, any>,
|
||||
options?: Record<string, string | boolean | number | undefined>
|
||||
) => {
|
||||
this.isSaving = true;
|
||||
|
||||
try {
|
||||
@@ -29,7 +32,7 @@ export default abstract class BaseModel {
|
||||
params = this.toAPI();
|
||||
}
|
||||
|
||||
const model = await this.store.save({ ...params, id: this.id });
|
||||
const model = await this.store.save({ ...params, id: this.id }, options);
|
||||
|
||||
// if saving is successful set the new values on the model itself
|
||||
set(this, { ...params, ...model });
|
||||
|
||||
Reference in New Issue
Block a user