mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -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)
|
input (mf/use-ref)
|
||||||
|
|
||||||
fonts (mf/use-memo (mf/deps @state) #(filter-fonts @state @fonts/fonts))
|
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
|
select-next
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
@ -259,7 +262,9 @@
|
||||||
|
|
||||||
fonts (mf/deref fonts/fontsdb)
|
fonts (mf/deref fonts/fontsdb)
|
||||||
font (get fonts font-id)
|
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)
|
last-font (mf/use-ref nil)
|
||||||
|
|
||||||
open-selector? (mf/use-state false)
|
open-selector? (mf/use-state false)
|
||||||
|
|
Loading…
Add table
Reference in a new issue