From 226aacdeaccda5cfc85b52d06fb674493c6f9ab1 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Tue, 9 Feb 2021 16:23:44 +0100 Subject: [PATCH] Only scale if width/height is positive Fixes: #11728 Signed-off-by: Andrea Maria Piana --- src/status_im/ui/screens/chat/message/styles.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/chat/message/styles.cljs b/src/status_im/ui/screens/chat/message/styles.cljs index 9c644a9312..1b27d226e6 100644 --- a/src/status_im/ui/screens/chat/message/styles.cljs +++ b/src/status_im/ui/screens/chat/message/styles.cljs @@ -130,7 +130,8 @@ :height (* aspect-ratio max-width)}))) (defn link-preview-image [outgoing {:keys [height width] :as dimensions}] - (merge (if (and height width) + (merge (if (and (pos? height) + (pos? width)) (scale-dimensions dimensions) {:height 170}) {:overflow :hidden