Skip to content

Commit

Permalink
Merge pull request #1 from MaxInMoon/MaxInMoon-patch-DatePickerAndroi…
Browse files Browse the repository at this point in the history
…d-0.57

Fix DatePickerAndroid error when passing "minDate: null"
  • Loading branch information
MaxInMoon authored Sep 26, 2018
2 parents 544adca + 0fc9a00 commit 5536cff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DatePickerModule = require('NativeModules').DatePickerAndroid;
function _toMillis(options: Object, key: string) {
const dateVal = options[key];
// Is it a Date object?
if (typeof dateVal === 'object' && typeof dateVal.getMonth === 'function') {
if (dateVal != null && typeof dateVal == 'object' && typeof dateVal.getMonth === 'function') {
options[key] = dateVal.getTime();
}
}
Expand Down

0 comments on commit 5536cff

Please sign in to comment.