diff options
author | crupest <crupest@outlook.com> | 2021-03-18 21:17:12 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-03-18 21:17:12 +0800 |
commit | 36145a18463e0ad4fb372df82cd488f1b4dae2f7 (patch) | |
tree | f6761eacb376f277f6d6f3ba0e7f1fe7c626123b /FrontEnd/src/app/services | |
parent | e83da106a259f4a8ab11324eceef2c15a9a08bf0 (diff) | |
download | timeline-36145a18463e0ad4fb372df82cd488f1b4dae2f7.tar.gz timeline-36145a18463e0ad4fb372df82cd488f1b4dae2f7.tar.bz2 timeline-36145a18463e0ad4fb372df82cd488f1b4dae2f7.zip |
feat: Prevent leave.
Diffstat (limited to 'FrontEnd/src/app/services')
-rw-r--r-- | FrontEnd/src/app/services/TimelinePostBuilder.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FrontEnd/src/app/services/TimelinePostBuilder.ts b/FrontEnd/src/app/services/TimelinePostBuilder.ts index 92d8484b..40279eca 100644 --- a/FrontEnd/src/app/services/TimelinePostBuilder.ts +++ b/FrontEnd/src/app/services/TimelinePostBuilder.ts @@ -82,6 +82,10 @@ export default class TimelinePostBuilder { return this._images; } + get isEmpty(): boolean { + return this._text.length === 0 && this._images.length === 0; + } + renderHtml(): string { return this._md.render(this._text); } |