From dfc938b804a0a504e973368edb165a1ea544912e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Thu, 4 Jun 2020 09:43:07 +0200 Subject: [PATCH] :bug: Fix image paste in production build --- frontend/src/uxbox/util/webapi.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/uxbox/util/webapi.cljs b/frontend/src/uxbox/util/webapi.cljs index 473c64bca4..287532135f 100644 --- a/frontend/src/uxbox/util/webapi.cljs +++ b/frontend/src/uxbox/util/webapi.cljs @@ -86,10 +86,10 @@ [] (let [cboard (unchecked-get js/navigator "clipboard") read-item (fn [item] - (let [img-type (->> (.-types item) + (let [img-type (->> (.-types ^js item) (d/seek #(str/starts-with? % "image/")))] (if img-type - (rx/from (.getType item img-type)) + (rx/from (.getType ^js item img-type)) (rx/empty))))] (->> (rx/from (.read ^js cboard)) ;; Get a stream of item lists (rx/mapcat identity) ;; Convert each item into an emission