Skip to content

Commit

Permalink
fix: delay work till can now be 00 after edit
Browse files Browse the repository at this point in the history
  • Loading branch information
KeziahMoselle committed Mar 14, 2019
1 parent d4350ca commit 5134d28
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down

0 comments on commit 5134d28

Please sign in to comment.