Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Make moment function call simpler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shammamah Hossain committed Nov 5, 2019
1 parent cbc6747 commit e9cc38e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils/convertToMoment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ export default (newProps, momentProps) => {

if (key === 'initial_visible_month') {
dest[key] = newProps['start_date'] || newProps['min_date_allowed']
|| newProps['end_date'] || newProps['max_date_allowed'] ?
moment(newProps['start_date'] || newProps['min_date_allowed']
|| newProps['end_date'] || newProps['max_date_allowed']) :
moment();
|| newProps['end_date'] || newProps['max_date_allowed'] || undefined);
}
} else {
dest[key] = moment(value);
Expand Down

0 comments on commit e9cc38e

Please sign in to comment.