Skip to content

Commit

Permalink
crude fix for tolitius#104
Browse files Browse the repository at this point in the history
  • Loading branch information
krajj7 committed Dec 24, 2018
1 parent 76e9a71 commit cf47d31
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mount/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,9 @@
`(do
;; (log (str "|| mounting... " ~state-name))
;; only create/redefine a new state iff this is not a running ^{:on-reload :noop}
(~'defonce ~state (->DerefableState ~state-name))
(if-not (running-noop? ~state-name)
(do
(~'defonce ~state (->DerefableState ~state-name))
(mount-it (~'var ~state) ~state-name ~s-meta))
(~'defonce ~state (current-state ~state-name)))
(mount-it (~'var ~state) ~state-name ~s-meta))
(~'var ~state)))))

(defmacro defstate! [state & {:keys [start! stop!]}]
Expand Down

0 comments on commit cf47d31

Please sign in to comment.