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:
Tom Moor
2022-04-03 11:51:38 -07:00
committed by GitHub
parent 5cd002bb88
commit 41579eb4bf
2 changed files with 20 additions and 1 deletions

View File

@@ -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";