fix: check if stats is present before reseting zoom (#2029)

This commit is contained in:
Even Stensberg
2018-05-09 00:24:02 +02:00
committed by Andrew Henry
parent e2217e008a
commit 062ba4a9d7

View File

@ -152,7 +152,7 @@ define([
this.resetStats();
},
toggleAutoscale: function (autoscale) {
if (autoscale) {
if (autoscale && this.has('stats')) {
this.set('displayRange', this.applyPadding(this.get('stats')));
} else {
this.set('displayRange', this.get('range'));