aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/services
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-18 21:17:12 +0800
committercrupest <crupest@outlook.com>2021-03-18 21:17:12 +0800
commit36145a18463e0ad4fb372df82cd488f1b4dae2f7 (patch)
treef6761eacb376f277f6d6f3ba0e7f1fe7c626123b /FrontEnd/src/app/services
parente83da106a259f4a8ab11324eceef2c15a9a08bf0 (diff)
downloadtimeline-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.ts4
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);
}