From 98c04c230e480c9b4ee8bd7b19286523e9e4e6b5 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Mon, 22 Feb 2021 15:55:45 +0800
Subject: ...

---
 FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx')

diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx
index 05bd9ed6..5bc5b166 100644
--- a/FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx
+++ b/FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx
@@ -49,7 +49,7 @@ const TimelinePostEditImage: React.FC<TimelinePostEditImageProps> = (props) => {
         accept="image/*"
         className="mx-3 my-1 d-inline-block"
       />
-      {file != null && error == null && (
+      {file != null && !error && (
         <BlobImage
           blob={file}
           className="timeline-post-edit-image"
@@ -60,9 +60,7 @@ const TimelinePostEditImage: React.FC<TimelinePostEditImageProps> = (props) => {
           }}
         />
       )}
-      {error != null && (
-        <div className="text-danger">{t("loadImageError")}</div>
-      )}
+      {error ? <div className="text-danger">{t("loadImageError")}</div> : null}
     </>
   );
 };
-- 
cgit v1.2.3

