fix: stop shadowing vars for rest of frontend

Follow up to 5ff364ba1e
This commit is contained in:
Gabriel Horner
2024-09-07 00:13:09 -04:00
parent 12f5215d6c
commit 70383cd813
41 changed files with 258 additions and 260 deletions

View File

@@ -520,16 +520,16 @@
:did-update (fn [state]
(let [next-theme (get-theme!)
last-theme @(:last-theme state)
editor (some-> state :editor-atom deref)]
(when (and editor (not= next-theme last-theme))
editor' (some-> state :editor-atom deref)]
(when (and editor' (not= next-theme last-theme))
(reset! (:last-theme state) next-theme)
(.setOption editor "theme" next-theme)))
(.setOption editor' "theme" next-theme)))
(reset! (:code-options state) (last (:rum/args state)))
(when-not (:file? (first (:rum/args state)))
(let [code (nth (:rum/args state) 3)
editor @(:editor-atom state)]
(when (and editor (not= (.getValue editor) code))
(.setValue editor code))))
editor' @(:editor-atom state)]
(when (and editor' (not= (.getValue editor') code))
(.setValue editor' code))))
state)}
[state _config id attr code _theme _options]
[:div.extensions__code