Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Integrant resume-key method #30

Merged
merged 1 commit into from
Aug 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))))