From 9a4c8dc358b2c0aee5999e7c88c22b92578219b0 Mon Sep 17 00:00:00 2001 From: Matthew Sullivan Date: Tue, 10 Jul 2018 16:54:19 -0400 Subject: [PATCH] fix formatting function --- lib/stopwatch.js | 2 +- lib/timer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/stopwatch.js b/lib/stopwatch.js index 32d1bc7..884e039 100644 --- a/lib/stopwatch.js +++ b/lib/stopwatch.js @@ -112,7 +112,7 @@ class StopWatch extends Component { } if (typeof this.props.getTime === "function") - this.props.getTime(formatted); + formatted = this.props.getTime(formatted); return formatted; } diff --git a/lib/timer.js b/lib/timer.js index 0076e40..d3ec26c 100644 --- a/lib/timer.js +++ b/lib/timer.js @@ -104,7 +104,7 @@ class Timer extends Component { } if (typeof this.props.getTime === "function") - this.props.getTime(formatted); + formatted = this.props.getTime(formatted); return formatted; }