File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ class ColumnSettings extends Component {
28
28
*/
29
29
const settings = this . props . chart [ 'visualizer-settings' ] ;
30
30
31
+ if ( ! settings . series ) {
32
+ return ;
33
+ }
34
+
31
35
Object . keys ( settings . series )
32
36
. map ( i => {
33
37
if ( settings . series [ i ] !== undefined ) {
@@ -47,6 +51,10 @@ class ColumnSettings extends Component {
47
51
48
52
const type = this . props . chart [ 'visualizer-chart-type' ] ;
49
53
54
+ if ( ! settings . series ) {
55
+ return null ;
56
+ }
57
+
50
58
return (
51
59
< PanelBody
52
60
title = { __ ( 'Column Settings' ) }
@@ -56,14 +64,15 @@ class ColumnSettings extends Component {
56
64
57
65
{ Object . keys ( settings . series )
58
66
. map ( ( i ) => {
67
+
59
68
return (
60
69
< PanelBody
61
70
title = { series [ i ] . label }
62
71
className = "visualizer-inner-sections"
63
72
initialOpen = { false }
64
73
>
65
74
66
- { ( 'date' === series [ i ] . type || 'datetime' === series [ i ] . type || 'timeofday' === series [ i ] . type ) && (
75
+ { 0 <= [ 'date' , 'datetime' , 'timeofday' ] . indexOf ( series [ i ] . type ) && (
67
76
< Fragment >
68
77
< TextControl
69
78
label = { __ ( 'Display Date Format' ) }
@@ -171,7 +180,7 @@ class ColumnSettings extends Component {
171
180
</ Fragment >
172
181
) }
173
182
174
- { ( 'boolean' === series [ i ] . type ) && ( 'dataTable' === type ) && (
183
+ { ( 'boolean' === series [ i ] . type ) && (
175
184
< Fragment >
176
185
< TextControl
177
186
label = { __ ( 'Truthy value' ) }
You can’t perform that action at this time.
0 commit comments