0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

🐛 Prevent duplicate locale watcher on hot code reload

This commit is contained in:
Andrey Antukh 2022-10-20 00:11:20 +02:00
parent 6323c3ac92
commit f51e35aa9c

View file

@ -105,7 +105,7 @@
(swap! storage dissoc ::locale) (swap! storage dissoc ::locale)
(reset! locale (autodetect))) (reset! locale (autodetect)))
(add-watch locale ::browser-font (add-watch locale "browser-font"
(fn [_ _ _ locale] (fn [_ _ _ locale]
(log/info :hint "locale changed" :locale locale) (log/info :hint "locale changed" :locale locale)
(dom/set-html-lang! locale) (dom/set-html-lang! locale)