]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/history.js
Merge remote-tracking branch 'upstream/pull/2670'
[rails.git] / app / assets / javascripts / index / history.js
index 80fb68444f6469ee4e41e03d2f09654a337dfe12..ddb454c13155e770bc4110e8b028d3a054fe13dd 100644 (file)
@@ -40,12 +40,14 @@ OSM.History = function (map) {
   };
 
   function highlightChangeset(id) {
-    group.getLayer(id).setStyle({ fillOpacity: 0.3, color: "#FF6600", weight: 3 });
+    var layer = group.getLayer(id);
+    if (layer) layer.setStyle({ fillOpacity: 0.3, color: "#FF6600", weight: 3 });
     $("#changeset_" + id).addClass("selected");
   }
 
   function unHighlightChangeset(id) {
-    group.getLayer(id).setStyle({ fillOpacity: 0, color: "#FF9500", weight: 2 });
+    var layer = group.getLayer(id);
+    if (layer) layer.setStyle({ fillOpacity: 0, color: "#FF9500", weight: 2 });
     $("#changeset_" + id).removeClass("selected");
   }