aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/app')
-rw-r--r--src/app/components/post-page/post-page.component.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/app/components/post-page/post-page.component.ts b/src/app/components/post-page/post-page.component.ts
index 648048b..3218a19 100644
--- a/src/app/components/post-page/post-page.component.ts
+++ b/src/app/components/post-page/post-page.component.ts
@@ -116,12 +116,9 @@ export class PostPageComponent implements OnInit {
}
if (this.editingPost) {
- let newMessage = this.editPostFormGroup.get('newPostMessage')?.value;
+ const newMessage = this.editPostFormGroup.get('newPostMessage')?.value;
- if (newMessage !== this.post.message) {
- if (newMessage === '') {
- newMessage = this.post.message;
- }
+ if (newMessage === '' && newMessage !== this.post.message) {
this._postService.putPostWithSessionStorageRequest(this.postId, newMessage, this.files).subscribe(
(result: object) => {
this.reloadPage();