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

Commit

Permalink
v1.3.19 - Prevent error on missing locale
Browse files Browse the repository at this point in the history
  • Loading branch information
jducro committed Apr 3, 2018
1 parent bab772d commit 38c9dba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## v1.3.18 - 2017-03-21
## v1.3.19 - 2018-04-03

* Prevent error on missing locale

## v1.3.18 - 2018-03-21

* Adds prepublish script

## v1.3.17 - 2017-03-21
## v1.3.17 - 2018-03-21

* Fix click on SelectableList

Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deskpro/react-components",
"version": "1.3.18",
"version": "1.3.19",
"description": "Deskpro React Components",
"main": "dist/index.js",
"homepage": "https://github.com/deskpro/react-components",
Expand Down
7 changes: 6 additions & 1 deletion src/Components/Forms/Datepicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ export default class Datepicker extends React.Component {
this.format += ' HH:mm';
}

this.firstWeekDay = moment.localeData(props.locale).firstDayOfWeek();
const localeData = moment.localeData(props.locale);
if (localeData) {
this.firstWeekDay = moment.localeData(props.locale).firstDayOfWeek();
} else {
this.firstWeekDay = 0;
}

if (props.value) {
const momentDate = moment(props.value, this.format);
Expand Down

0 comments on commit 38c9dba

Please sign in to comment.