From d080c8dc2bc7d333560284244b18fe3df58faac6 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Mon, 31 Aug 2015 10:00:07 -0700 Subject: [PATCH] [RN] fix TimerExample Summary: Pressing clear would crash if timer was unmounted. Fixed by not rendering clear button when timer unmounted. --- Examples/UIExplorer/TimerExample.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Examples/UIExplorer/TimerExample.js b/Examples/UIExplorer/TimerExample.js index 0bfd5d05a..b5923b350 100644 --- a/Examples/UIExplorer/TimerExample.js +++ b/Examples/UIExplorer/TimerExample.js @@ -181,8 +181,12 @@ exports.examples = [ render: function() { if (this.state.showTimer) { - var timer = - ; + var timer = [ + , + + ]; var toggleText = 'Unmount timer'; } else { var timer = null; @@ -191,9 +195,6 @@ exports.examples = [ return ( {timer} -