From 4f26f23b14ec9f1aa6260b1eee9a190639530b45 Mon Sep 17 00:00:00 2001
From: Antony Shaleynikov <shaleynikov@gmail.com>
Date: Wed, 8 Mar 2017 22:50:57 +0300
Subject: Fixed unwanted exception on missed value

---
 src/Combobox.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/Combobox.jsx')

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({
   },
 
   isAM() {
-    const { value } = this.props;
+    const value = (this.props.value || this.props.defaultOpenValue);
     return value.hour() >= 0 && value.hour() < 12;
   },
 
-- 
cgit v1.2.3

