diff --git a/src/directives/scaleselector.js b/src/directives/scaleselector.js index ce98a88056e2..7ce169b59ce5 100644 --- a/src/directives/scaleselector.js +++ b/src/directives/scaleselector.js @@ -225,9 +225,11 @@ ngeo.ScaleselectorController.prototype.handleResolutionChange_ = function(e) { // // For that reason we use $applyAsync instead of $apply here. - this.$scope_.$applyAsync(() => { - this.currentScale = currentScale; - }); + if (currentScale !== undefined) { + this.$scope_.$applyAsync(() => { + this.currentScale = currentScale; + }); + } };