mirror of
https://github.com/penpot/penpot.git
synced 2026-08-06 21:08:34 +00:00
🐛 Fix issues with draft-js tests
This commit is contained in:
parent
b6656ee8dd
commit
a60b648c6c
@ -22,7 +22,8 @@ export const {
|
||||
} = pkg;
|
||||
|
||||
import DraftPasteProcessor from 'draft-js/lib/DraftPasteProcessor.js';
|
||||
import {Map, OrderedSet} from "immutable";
|
||||
import Immutable from "immutable";
|
||||
const {Map, OrderedSet} = Immutable;
|
||||
|
||||
function isDefined(v) {
|
||||
return v !== undefined && v !== null;
|
||||
|
||||
@ -1217,7 +1217,7 @@
|
||||
(rx/mapcat (fn [blob]
|
||||
;; Resolve the deferred with the fetched blob; the browser
|
||||
;; will now complete the clipboard write it started earlier.
|
||||
(p/resolve! deferred blob)
|
||||
(p/resolve deferred blob)
|
||||
(rx/from write-promise)))
|
||||
(rx/map (fn [_]
|
||||
(ntf/success (tr "workspace.clipboard.image-copied"))))
|
||||
@ -1225,5 +1225,5 @@
|
||||
(js/console.error "clipboard error:" e)
|
||||
;; Reject the deferred in case the error occurred before the
|
||||
;; blob was fetched, so the pending clipboard write is cancelled.
|
||||
(p/reject! deferred e)
|
||||
(p/reject deferred e)
|
||||
(rx/of (ntf/error (tr "workspace.clipboard.image-copy-failed")))))))))))
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
"Signals that plugins runtime has been initialized. Called by app.plugins/init-plugins-runtime."
|
||||
[]
|
||||
(when (p/pending? runtime-ready-promise)
|
||||
(p/resolve! runtime-ready-promise true)))
|
||||
(p/resolve runtime-ready-promise true)))
|
||||
|
||||
;; Stores the installed plugins information
|
||||
(defonce ^:private registry (atom {}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user