mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Fix deleted fonts present in recent block
This commit is contained in:
parent
d939a86e75
commit
53cee87701
1 changed files with 7 additions and 2 deletions
|
@ -102,7 +102,10 @@
|
|||
input (mf/use-ref)
|
||||
|
||||
fonts (mf/use-memo (mf/deps @state) #(filter-fonts @state @fonts/fonts))
|
||||
recent-fonts (mf/deref refs/workspace-recent-fonts)
|
||||
fontsdb (mf/deref fonts/fontsdb)
|
||||
;; Filtering deleted fonts
|
||||
recent-fonts (->> (mf/deref refs/workspace-recent-fonts)
|
||||
(into [] (filter #(some? (get fontsdb (:id %))))))
|
||||
|
||||
select-next
|
||||
(mf/use-callback
|
||||
|
@ -259,7 +262,9 @@
|
|||
|
||||
fonts (mf/deref fonts/fontsdb)
|
||||
font (get fonts font-id)
|
||||
recent-fonts (mf/deref refs/workspace-recent-fonts)
|
||||
;; Filtering deleted fonts
|
||||
recent-fonts (->> (mf/deref refs/workspace-recent-fonts)
|
||||
(into [] (filter #(some? (get fonts (:id %))))))
|
||||
last-font (mf/use-ref nil)
|
||||
|
||||
open-selector? (mf/use-state false)
|
||||
|
|
Loading…
Reference in a new issue