mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
🐛 Fix problem with font loading
This commit is contained in:
parent
a4796e8db8
commit
9c35652043
1 changed files with 7 additions and 7 deletions
|
@ -211,7 +211,7 @@
|
|||
|
||||
;; Font is currently downloading. We attach the caller to the promise
|
||||
(contains? @loading font-id)
|
||||
(p/resolved (get @loading font-id))
|
||||
(get @loading font-id)
|
||||
|
||||
;; First caller, we create the promise and then wait
|
||||
:else
|
||||
|
@ -220,13 +220,13 @@
|
|||
(swap! loading dissoc font-id)
|
||||
(resolve font-id))
|
||||
|
||||
load-p (->> (p/create
|
||||
(fn [resolve _]
|
||||
(-> font
|
||||
(assoc ::on-loaded (partial on-load resolve))
|
||||
(load-font))))
|
||||
load-p (-> (p/create
|
||||
(fn [resolve _]
|
||||
(-> font
|
||||
(assoc ::on-loaded (partial on-load resolve))
|
||||
(load-font))))
|
||||
;; We need to wait for the font to be loaded
|
||||
(p/delay 120))]
|
||||
(p/then (partial p/delay 120)))]
|
||||
|
||||
(swap! loading assoc font-id load-p)
|
||||
load-p))))))
|
||||
|
|
Loading…
Add table
Reference in a new issue