Hotfix for incorrect ternary statement in DatePicker

old
Ro Savage 2016-04-28 12:12:59 +12:00
parent 62e532218b
commit d7b820a7cf
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class DatePicker extends React.Component {
const { inputClassName, value } = this.props;
const inputFormat = this.props.inputFormat || time.formatDate;
const date = Object.prototype.toString.call(value) === '[object Date]' ? value : undefined;
const formattedDate = date === undefined ? inputFormat(value) : '';
const formattedDate = date === undefined ? '' : inputFormat(value);
return (
<div data-react-toolbox='date-picker'>