diff options
author | 偏右 <afc163@gmail.com> | 2017-03-09 10:33:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-09 10:33:55 +0800 |
commit | b6cc5aae93c7ce151adeca367b9c295b41157ede (patch) | |
tree | 3c784e38d0fe1facf5fe08d37fdbe701ef3f2ea5 /src | |
parent | e3b09ca0ac66c44f326584c0bd813437b96748ec (diff) | |
parent | 4f26f23b14ec9f1aa6260b1eee9a190639530b45 (diff) | |
download | time-picker-b6cc5aae93c7ce151adeca367b9c295b41157ede.tar.gz time-picker-b6cc5aae93c7ce151adeca367b9c295b41157ede.tar.zst time-picker-b6cc5aae93c7ce151adeca367b9c295b41157ede.zip |
Merge pull request #35 from shaleynikov/master
Fixed unwanted exception if value is undefined
Diffstat (limited to 'src')
-rw-r--r-- | src/Combobox.jsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Combobox.jsx b/src/Combobox.jsx index 36b61cc..477c5ee 100644 --- a/src/Combobox.jsx +++ b/src/Combobox.jsx | |||
@@ -170,7 +170,7 @@ const Combobox = React.createClass({ | |||
170 | }, | 170 | }, |
171 | 171 | ||
172 | isAM() { | 172 | isAM() { |
173 | const { value } = this.props; | 173 | const value = (this.props.value || this.props.defaultOpenValue); |
174 | return value.hour() >= 0 && value.hour() < 12; | 174 | return value.hour() >= 0 && value.hour() < 12; |
175 | }, | 175 | }, |
176 | 176 | ||