Skip to content

Commit

Permalink
Hotfix for incorrect ternary statement in DatePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
ro-savage committed Apr 28, 2016
1 parent 62e5322 commit d7b820a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/date_picker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'>
Expand Down

0 comments on commit d7b820a

Please sign in to comment.