From ba1869167480272448f937b0175aad813023def2 Mon Sep 17 00:00:00 2001 From: Dan Holmsand Date: Sat, 15 Feb 2014 12:29:16 +0100 Subject: [PATCH] Cleanup --- src/reagent/impl/component.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/reagent/impl/component.cljs b/src/reagent/impl/component.cljs index 4e677da..c793f8c 100644 --- a/src/reagent/impl/component.cljs +++ b/src/reagent/impl/component.cljs @@ -72,7 +72,7 @@ :componentWillReceiveProps (fn [props] (this-as C - (when f (f C (aget props cljs-argv))))) + (f C (aget props cljs-argv)))) :shouldComponentUpdate (fn [nextprops nextstate] @@ -102,7 +102,8 @@ (fn [] (this-as C (batch/dispose C) - (when f (f C)))) + (when-not (nil? f) + (f C)))) nil))