From be829d3cc0868f1b48209441336263ba9a8fab85 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 8 Feb 2022 17:18:31 +0000 Subject: [PATCH] fix event-bus:subscribe seems to be a Fennel bug: the problem is that tset is taken out of the or and nil is placed in place of it, thus making side effect occur even though it shouldn't telent: good catch --- just/just.fnl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/just/just.fnl b/just/just.fnl index fc0fd49..2ede2e1 100644 --- a/just/just.fnl +++ b/just/just.fnl @@ -21,7 +21,7 @@ (fn event-bus [] (let [subscriptions {} vivify (fn [n v] - (or (. n v) (tset n v {})) + (tset n v (or (. n v) [])) (. n v))] { :subscriptions subscriptions