Skip to content

Commit

Permalink
Merge pull request #2409 from filipesilva/rf10x-autoload
Browse files Browse the repository at this point in the history
fix: don't error out when re-frame-10x is missing
  • Loading branch information
filipesilva authored Oct 10, 2022
2 parents 88e796f + b28117d commit f8b0fb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cljs/athens/util.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,21 @@
[]
(when config/debug?
(let [el-10x (getElement "--re-frame-10x--")
display-10x (.. el-10x -style -display)]
display-10x (and el-10x (.. el-10x -style -display))]
(not (= "none" display-10x)))))


(defn open-10x
[]
(when config/debug?
(let [el (js/document.querySelector "#--re-frame-10x--")]
(when-let [el (js/document.querySelector "#--re-frame-10x--")]
(setProperties el (clj->js {"style" "display: block"})))))


(defn hide-10x
[]
(when config/debug?
(let [el (js/document.querySelector "#--re-frame-10x--")]
(when-let [el (js/document.querySelector "#--re-frame-10x--")]
(setProperties el (clj->js {"style" "display: none"})))))


Expand Down

0 comments on commit f8b0fb1

Please sign in to comment.