From: Tom Hughes Date: Fri, 5 Oct 2012 17:01:02 +0000 (+0100) Subject: Don't try and dereference an object that may not exist X-Git-Tag: live~5832 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/762d615859b47d4c25e1c529a04fb08aed665d9c Don't try and dereference an object that may not exist --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index b608a1cd0..c52c072a7 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -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;