From 5134d28592f394cbe45023f03b5a194dc78e3034 Mon Sep 17 00:00:00 2001 From: KeziahMoselle Date: Thu, 14 Mar 2019 18:11:26 +0100 Subject: [PATCH] fix: delay work till can now be 00 after edit --- src/App.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.jsx b/src/App.jsx index 0d7608e..29af237 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -190,7 +190,13 @@ class App extends Component { const date = new Date() date.setHours(date.getHours() + 1) - const minutesValue = value || this.state.workTillDelayedMinutes + + let minutesValue + if (value === undefined) { + minutesValue = this.state.workTillDelayedMinutes + } else { + minutesValue = value + } date.setMinutes(minutesValue) const nextHour = date.toLocaleString('en-US', {