]> git.openstreetmap.org Git - rails.git/commitdiff
Don't try and dereference an object that may not exist
authorTom Hughes <tom@compton.nu>
Fri, 5 Oct 2012 17:01:02 +0000 (18:01 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 5 Oct 2012 17:01:02 +0000 (18:01 +0100)
app/assets/javascripts/application.js

index b608a1cd04561dd95e2d45ddc7e21d7245323b57..c52c072a754fa941a33b61b920aebe96e7b3ffe0 100644 (file)
@@ -99,7 +99,7 @@ function updatelinks(lon,lat,zoom,layers,minlon,minlat,maxlon,maxlat,object) {
     // ?{node,way,relation}= can be safely omitted from the shortlink
     // which encodes lat/lon/zoom. If new URL parameters are added to
     // the main slippy map this needs to be changed.
-    if (args.layers || args[object.type]) {
+    if (args.layers || object) {
       this.href = setArgs(prefix + "/go/" + code, args);
     } else {
       this.href = prefix + "/go/" + code;