mirror of
https://github.com/outline/outline.git
synced 2026-11-26 23:50:14 +03:00
flow
This commit is contained in:
1 parent
33815639f2
commit
4b4f4fd188
1 file changed
+11
-7
+11
-7
@@ -186,13 +186,17 @@ export default class Document extends BaseModel {
|
||||
});
|
||||
}
|
||||
|
||||
return await this.store.update({
|
||||
id: this.id,
|
||||
title: this.title,
|
||||
text: this.text,
|
||||
lastRevision: options.lastRevision,
|
||||
...options,
|
||||
});
|
||||
if (options.lastRevision) {
|
||||
return await this.store.update({
|
||||
id: this.id,
|
||||
title: this.title,
|
||||
text: this.text,
|
||||
lastRevision: options.lastRevision,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
|
||||
throw new Error('Attempting to update without a lastRevision');
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user