fix event-bus:subscribe
seems to be a Fennel bug: <andreyorst> the problem is that tset is taken out of the or and nil is placed in place of it, thus making side effect occur <andreyorst> even though it shouldn't <andreyorst> telent: good catch
This commit is contained in:
parent
cba16113a1
commit
be829d3cc0
@ -21,7 +21,7 @@
|
|||||||
(fn event-bus []
|
(fn event-bus []
|
||||||
(let [subscriptions {}
|
(let [subscriptions {}
|
||||||
vivify (fn [n v]
|
vivify (fn [n v]
|
||||||
(or (. n v) (tset n v {}))
|
(tset n v (or (. n v) []))
|
||||||
(. n v))]
|
(. n v))]
|
||||||
{
|
{
|
||||||
:subscriptions subscriptions
|
:subscriptions subscriptions
|
||||||
|
Loading…
Reference in New Issue
Block a user