From bd2ee2fd11ed37228570c519b7a52465d32ab48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Wed, 3 Jun 2020 13:57:31 +0200 Subject: [PATCH] :bug: Fix paste image in prod mode --- frontend/src/uxbox/util/webapi.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/uxbox/util/webapi.cljs b/frontend/src/uxbox/util/webapi.cljs index 137a18d760..473c64bca4 100644 --- a/frontend/src/uxbox/util/webapi.cljs +++ b/frontend/src/uxbox/util/webapi.cljs @@ -75,12 +75,12 @@ [data] (assert (string? data) "`data` should be string") (let [cboard (unchecked-get js/navigator "clipboard")] - (.writeText cboard data))) + (.writeText ^js cboard data))) (defn- read-from-clipboard [] (let [cboard (unchecked-get js/navigator "clipboard")] - (rx/from (.readText cboard)))) + (rx/from (.readText ^js cboard)))) (defn- read-image-from-clipboard [] @@ -91,7 +91,7 @@ (if img-type (rx/from (.getType item img-type)) (rx/empty))))] - (->> (rx/from (.read cboard)) ;; Get a stream of item lists + (->> (rx/from (.read ^js cboard)) ;; Get a stream of item lists (rx/mapcat identity) ;; Convert each item into an emission (rx/switch-map read-item))))