diff --git a/src/main/frontend/ui.cljs b/src/main/frontend/ui.cljs index cc38066a3b..f12fde65e3 100644 --- a/src/main/frontend/ui.cljs +++ b/src/main/frontend/ui.cljs @@ -326,9 +326,10 @@ (defn apply-custom-theme-effect! [theme] (when-let [custom-theme (state/sub [:ui/custom-theme (keyword theme)])] - (js/LSPluginCore.selectTheme (bean/->js custom-theme) - (bean/->js {:effect false :emit false})) - (state/set-state! :plugin/selected-theme (:url custom-theme)))) + (when-let [url (:url custom-theme)] + (js/LSPluginCore.selectTheme (bean/->js custom-theme) + (bean/->js {:effect false :emit false})) + (state/set-state! :plugin/selected-theme (:url url))))) (defn setup-system-theme-effect! []