Return nil when registering a handler
This commit is contained in:
parent
6df7320f97
commit
0ce1a04930
|
@ -64,7 +64,8 @@
|
|||
([event-id handler-fn]
|
||||
(when (contains? @id->fn event-id)
|
||||
(console :warn "re-frame: overwriting an event-handler for: " event-id)) ;; allow it, but warn.
|
||||
(swap! id->fn assoc event-id handler-fn))
|
||||
(swap! id->fn assoc event-id handler-fn)
|
||||
nil)
|
||||
|
||||
([event-id middleware handler-fn]
|
||||
(let [mid-ware (comp-middleware middleware) ;; compose the middleware
|
||||
|
|
Loading…
Reference in New Issue