From 0e62bf0b7bdc260e882fd185492939cbaed04d56 Mon Sep 17 00:00:00 2001
From: MG12 <wuzhao.mail@gmail.com>
Date: Sun, 13 Dec 2015 00:03:19 +0800
Subject: update test case and fix bugs

---
 src/module/Header.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/module/Header.jsx')

diff --git a/src/module/Header.jsx b/src/module/Header.jsx
index c2f8eef..fec02af 100644
--- a/src/module/Header.jsx
+++ b/src/module/Header.jsx
@@ -88,9 +88,9 @@ const Header = React.createClass({
 
         // if time value is disabled, response warning.
         if (
-          disabledHours.indexOf(value.getHourOfDay()) >= 0 ||
-          disabledMinutes.indexOf(value.getMinutes()) >= 0 ||
-          disabledSeconds.indexOf(value.getSeconds()) >= 0
+          (disabledHours && disabledHours.indexOf(value.getHourOfDay()) >= 0) ||
+          (disabledMinutes && disabledMinutes.indexOf(value.getMinutes()) >= 0) ||
+          (disabledSeconds && disabledSeconds.indexOf(value.getSeconds()) >= 0)
         ) {
           this.setState({
             invalid: true,
-- 
cgit v1.2.3

