Fix null reference

This commit is contained in:
Bartek Fabiszewski 2019-12-22 14:57:25 +01:00
parent c2e4bd1bc4
commit ceb8796590

View File

@ -176,7 +176,9 @@ export default class ChartViewModel extends ViewModel {
* @param {string} $className
*/
pointsRemoveClass($className) {
this.chartPoints.forEach((el) => el.classList.remove($className));
if (this.model.chartVisible && this.chartPoints) {
this.chartPoints.forEach((el) => el.classList.remove($className));
}
}
/**