aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/module/Combobox.jsx2
-rw-r--r--src/module/Header.jsx6
-rw-r--r--src/module/Panel.jsx2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/module/Combobox.jsx b/src/module/Combobox.jsx
index 27a8226..1e172a7 100644
--- a/src/module/Combobox.jsx
+++ b/src/module/Combobox.jsx
@@ -9,7 +9,7 @@ const formatOption = (option, disabledOptions) => {
9 } 9 }
10 10
11 let disabled = false; 11 let disabled = false;
12 if (disabledOptions.indexOf(option) >= 0) { 12 if (disabledOptions && disabledOptions.indexOf(option) >= 0) {
13 disabled = true; 13 disabled = true;
14 } 14 }
15 15
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({
88 88
89 // if time value is disabled, response warning. 89 // if time value is disabled, response warning.
90 if ( 90 if (
91 disabledHours.indexOf(value.getHourOfDay()) >= 0 || 91 (disabledHours && disabledHours.indexOf(value.getHourOfDay()) >= 0) ||
92 disabledMinutes.indexOf(value.getMinutes()) >= 0 || 92 (disabledMinutes && disabledMinutes.indexOf(value.getMinutes()) >= 0) ||
93 disabledSeconds.indexOf(value.getSeconds()) >= 0 93 (disabledSeconds && disabledSeconds.indexOf(value.getSeconds()) >= 0)
94 ) { 94 ) {
95 this.setState({ 95 this.setState({
96 invalid: true, 96 invalid: true,
diff --git a/src/module/Panel.jsx b/src/module/Panel.jsx
index 72934e5..12d23f7 100644
--- a/src/module/Panel.jsx
+++ b/src/module/Panel.jsx
@@ -9,7 +9,7 @@ function noop() {
9function generateOptions(length, disabledOptions, hideDisabledOptions) { 9function generateOptions(length, disabledOptions, hideDisabledOptions) {
10 const arr = []; 10 const arr = [];
11 for (let value = 0; value < length; value++) { 11 for (let value = 0; value < length; value++) {
12 if ((disabledOptions && disabledOptions.indexOf(value) < 0) || !hideDisabledOptions) { 12 if (!disabledOptions || disabledOptions.indexOf(value) < 0 || !hideDisabledOptions) {
13 arr.push(value); 13 arr.push(value);
14 } 14 }
15 } 15 }