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…
Reference in New Issue