From 973b30384908e7405d06d2c2152359a2f218759c Mon Sep 17 00:00:00 2001 From: luke Date: Sat, 6 Jan 2018 19:09:51 -0500 Subject: [PATCH] toggle default should obtain the not of the attr --- src/dommy/core.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dommy/core.cljs b/src/dommy/core.cljs index 1d0cfe3..8dd6dc5 100644 --- a/src/dommy/core.cljs +++ b/src/dommy/core.cljs @@ -222,7 +222,7 @@ "Toggles a dom attribute `k` on `elem`, optionally specifying the boolean value with `add?`" ([elem k] - (toggle-attr! elem k (boolean (attr elem k)))) + (toggle-attr! elem k (not (boolean (attr elem k))))) ([elem k ^boolean add?] (if add? (set-attr! elem k)