From d6b4bb6352b706b27a7a0f0138bc8041ae451d7d Mon Sep 17 00:00:00 2001 From: "Sascha L. Teichmann" Date: Sun, 8 Mar 2015 13:39:02 +0100 Subject: [PATCH] Replaced 'if (cond) { ...; return; } if (!cond) { ...; return; }' with 'if (cond) { ... } else { ... }'. --- cmd/mtwebmapper/web/js/auto-update.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } },