Don't set the layers argument if the caller didn't specify it.
authorTom Hughes <tom@compton.nu>
Mon, 31 Dec 2007 10:13:36 +0000 (10:13 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 31 Dec 2007 10:13:36 +0000 (10:13 +0000)
public/javascripts/site.js

index b1690b7d1ef4efa29ebd731643fd5a58cf903a37..6fb68e65a1630c0bd208f4efda0e25edbc0ff4cc 100644 (file)
@@ -11,7 +11,9 @@ function updatelinks(lon,lat,zoom,layers) {
     args["lat"] = lat;
     args["lon"] = lon;
     args["zoom"] = zoom;
-    args["layers"] = layers;
+    if (layers) {
+      args["layers"] = layers;
+    }
     node.href = setArgs(node.href, args);
   }
 
@@ -21,7 +23,9 @@ function updatelinks(lon,lat,zoom,layers) {
     args["lat"] = lat;
     args["lon"] = lon;
     args["zoom"] = zoom;
-    args["layers"] = layers;
+    if (layers) {
+      args["layers"] = layers;
+    }
     node.href = setArgs(node.href, args);
   }