Skip to content

Commit

Permalink
Fix Integrant resume-key method
Browse files Browse the repository at this point in the history
When resuming an Integrant component, this now halts the old
implementation, rather than the old options.
  • Loading branch information
danielcompton committed Aug 27, 2019
1 parent ecf976d commit 8e3f498
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sass4clj/integrant.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
(defmethod ig/init-key ::sass4clj [_ options]
(api/start options))

(defmethod ig/halt-key! ::sass4clj [this options]
(api/stop this))
(defmethod ig/halt-key! ::sass4clj [_ watcher]
(api/stop watcher))

(defmethod ig/suspend-key! ::sass4clj [this options]
(defmethod ig/suspend-key! ::sass4clj [_ watcher]
nil)

(defmethod ig/resume-key ::sass4clj [key opts old-opts old-impl]
(if (= opts old-opts)
old-impl
(do
(ig/halt-key! key old-opts)
(ig/halt-key! key old-impl)
(ig/init-key key opts))))

0 comments on commit 8e3f498

Please # to comment.