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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1029,7 +1029,8 @@ export default {
this.$emit('statusUpdated', status);
},
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.config.series.models.forEach(this.loadSeriesData, this);
}