From e80c6c94b38df7823de465cb9d68f04f18f2e56a Mon Sep 17 00:00:00 2001 From: mike-thompson-day8 Date: Fri, 24 Apr 2015 23:46:27 +1000 Subject: [PATCH] Improve comment --- src/re_frame/undo.cljs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/re_frame/undo.cljs b/src/re_frame/undo.cljs index b5939ac..15d36b3 100644 --- a/src/re_frame/undo.cljs +++ b/src/re_frame/undo.cljs @@ -128,10 +128,9 @@ (recur (dec n)))) (handlers/register-base ;; not a pure handler - :undo ;; usage: (dispatch [:undo n]) + :undo ;; usage: (dispatch [:undo n]) n is optional, defaults to 1 (fn handler [_ [_ n]] - ;; if n absent, defaults to 1. If clear-redos? absent, defaults to false. (if-not (undos?) (warn "re-frame: you did a (dispatch [:undo]), but there is nothing to undo.") (undo-n (or n 1)))))