Fixes resizing handler error - adds null check (#4218)

This commit is contained in:
Shefali Joshi
2021-09-16 16:10:48 -07:00
committed by GitHub
parent 63f9cd449f
commit 953a9daafb

View File

@ -1029,7 +1029,8 @@ export default {
this.$emit('statusUpdated', status); this.$emit('statusUpdated', status);
}, },
handleWindowResize() { handleWindowResize() {
if (this.offsetWidth !== this.$parent.$refs.plotWrapper.offsetWidth) { if (this.$parent.$refs.plotWrapper
&& (this.offsetWidth !== this.$parent.$refs.plotWrapper.offsetWidth)) {
this.offsetWidth = this.$parent.$refs.plotWrapper.offsetWidth; this.offsetWidth = this.$parent.$refs.plotWrapper.offsetWidth;
this.config.series.models.forEach(this.loadSeriesData, this); this.config.series.models.forEach(this.loadSeriesData, this);
} }