X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6053ed41242448b286cae2b14126add52ea07fb5..bf895a0332242df4189b507e647d0aa4ce4a5a04:/app/assets/javascripts/index/history.js diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index dfec793f6..8103f047e 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -126,7 +126,7 @@ OSM.History = function(map) { map.addLayer(group); if (window.location.pathname === '/history') { - map.on("moveend", update) + map.on("moveend", update); } update(); @@ -134,10 +134,7 @@ OSM.History = function(map) { page.unload = function() { map.removeLayer(group); - - if (window.location.pathname === '/history') { - map.off("moveend", update) - } + map.off("moveend", update); $("#history_tab").removeClass("current"); };