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 {
2937
2937
},
2938
2938
annotationsY () {
2939
2939
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 [];
2941
2941
2942
2942
const visible = ann .filter (a =>
2943
2943
a .show &&
@@ -3189,13 +3189,15 @@ export default {
3189
3189
mergedConfig .chart .grid .labels .yAxis .groupColor = null ;
3190
3190
}
3191
3191
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 ) {
3193
3193
mergedConfig .chart .annotations = this .config .chart .annotations .map (annotation => {
3194
3194
return useNestedProp ({
3195
3195
defaultConfig: DEFAULT_CONFIG .chart .annotations [0 ],
3196
3196
userConfig: annotation
3197
3197
})
3198
3198
})
3199
+ } else {
3200
+ mergedConfig .chart .annotations = [];
3199
3201
}
3200
3202
3201
3203
// ----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments