File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2937,7 +2937,7 @@ export default {
29372937 },
29382938 annotationsY () {
29392939 const ann = this .FINAL_CONFIG .chart .annotations ;
2940- if (! Array .isArray (ann) || ann .every (a => ! a .show )) return [];
2940+ if (! ann || ! Array .isArray (ann) || ann .every (a => ! a .show )) return [];
29412941
29422942 const visible = ann .filter (a =>
29432943 a .show &&
@@ -3189,13 +3189,15 @@ export default {
31893189 mergedConfig .chart .grid .labels .yAxis .groupColor = null ;
31903190 }
31913191
3192- if (this .config && Array .isArray (this .config .chart .annotations ) && this .config .chart .annotations .length ) {
3192+ if (this .config && this . config . chart . annotations && Array .isArray (this .config .chart .annotations ) && this .config .chart .annotations .length ) {
31933193 mergedConfig .chart .annotations = this .config .chart .annotations .map (annotation => {
31943194 return useNestedProp ({
31953195 defaultConfig: DEFAULT_CONFIG .chart .annotations [0 ],
31963196 userConfig: annotation
31973197 })
31983198 })
3199+ } else {
3200+ mergedConfig .chart .annotations = [];
31993201 }
32003202
32013203 // ----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments