diff --git a/cmd/mtwebmapper/web/js/auto-update.js b/cmd/mtwebmapper/web/js/auto-update.js index d9a2d91..9c805e2 100644 --- a/cmd/mtwebmapper/web/js/auto-update.js +++ b/cmd/mtwebmapper/web/js/auto-update.js @@ -21,13 +21,10 @@ L.Control.AutoUpdate = L.Control.extend({ this.pressed = false; this.iconStart.setAttribute('class', 'fa fa-pause'); this.autoUpdate(); - return; - } - if (!this.pressed) { + } else { this.pressed = true; this.iconStart.setAttribute('class', 'fa fa-play'); this.stopUpdate(); - return; } },