mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
Only scale if width/height is positive
Fixes: #11728 Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
a37dbb57d6
commit
226aacdeac
@ -130,7 +130,8 @@
|
|||||||
:height (* aspect-ratio max-width)})))
|
:height (* aspect-ratio max-width)})))
|
||||||
|
|
||||||
(defn link-preview-image [outgoing {:keys [height width] :as dimensions}]
|
(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)
|
(scale-dimensions dimensions)
|
||||||
{:height 170})
|
{:height 170})
|
||||||
{:overflow :hidden
|
{:overflow :hidden
|
||||||
|
Loading…
x
Reference in New Issue
Block a user