diff --git a/src/day8/re_frame/trace.cljs b/src/day8/re_frame/trace.cljs index 182beb0..23ce731 100644 --- a/src/day8/re_frame/trace.cljs +++ b/src/day8/re_frame/trace.cljs @@ -119,7 +119,8 @@ (defn search-input [{:keys [title on-save on-stop]}] (let [val (r/atom title) save #(let [v (-> @val str str/trim)] - (on-save v))] + (when (pos? (count v)) + (on-save v)))] (fn [] [:input {:type "text" :value @val