mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 17:21:17 -05:00
🐛 Fix paste image in prod mode
This commit is contained in:
parent
a3490ea36d
commit
bd2ee2fd11
1 changed files with 3 additions and 3 deletions
|
@ -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))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue