fix: Cleanup totally empty drafts on leave (#3310)
* fix: Cleanup totally empty drafts on leave * cleanup * fix: Add check the doc has never been saved after creation when auto-deleting
This commit is contained in:
@@ -172,6 +172,11 @@ export default class Document extends BaseModel {
|
||||
return !this.publishedAt;
|
||||
}
|
||||
|
||||
@computed
|
||||
get hasEmptyTitle(): boolean {
|
||||
return this.title === "";
|
||||
}
|
||||
|
||||
@computed
|
||||
get titleWithDefault(): string {
|
||||
return this.title || "Untitled";
|
||||
|
||||
Reference in New Issue
Block a user