Don't try and dereference an object that may not exist
This commit is contained in:
parent
824a474d93
commit
762d615859
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue