aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-22 15:55:45 +0800
committercrupest <crupest@outlook.com>2021-02-22 15:55:45 +0800
commit98c04c230e480c9b4ee8bd7b19286523e9e4e6b5 (patch)
tree0f1c799dce511350bf412abeea2cf66755f24147
parent29223844b0417eb3df111268ecaa1b763ec02309 (diff)
downloadtimeline-98c04c230e480c9b4ee8bd7b19286523e9e4e6b5.tar.gz
timeline-98c04c230e480c9b4ee8bd7b19286523e9e4e6b5.tar.bz2
timeline-98c04c230e480c9b4ee8bd7b19286523e9e4e6b5.zip
...
-rw-r--r--FrontEnd/src/app/views/timeline-common/TimelinePostEdit.tsx6
1 files changed, 2 insertions, 4 deletions
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}
</>
);
};