Skip to content

Commit

Permalink
Merge pull request #26 from jquense/master
Browse files Browse the repository at this point in the history
fix: prevent endless loop when adding event the DST begin day (jquense#1635)
  • Loading branch information
pl2476 authored Apr 20, 2020
2 parents 8b61cb4 + b9abf77 commit 4019c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DayColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ class DayColumn extends React.Component {

while (dates.lte(current, endDate)) {
slots.push(current)
current = dates.add(current, this.props.step, 'minutes')
current = new Date(+current + this.props.step * 60 * 1000) // using Date ensures not to create an endless loop the day DST begins
}

notify(this.props.onSelectSlot, {
Expand Down

0 comments on commit 4019c3b

Please sign in to comment.