Skip to content

Commit

Permalink
fix: handleNavigate for undefined date (jquense#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasandersen authored and jquense committed Jun 27, 2018
1 parent 558ee2d commit cc84f17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -842,12 +842,13 @@ class Calendar extends React.Component {
handleNavigate = (action, newDate) => {
let { view, date, getNow, onNavigate, ...props } = this.props
let ViewComponent = this.getView()
let today = getNow()

date = moveDate(ViewComponent, {
...props,
action,
date: newDate || date,
today: getNow(),
date: newDate || date || today,
today,
})

onNavigate(date, view, action)
Expand Down

0 comments on commit cc84f17

Please sign in to comment.