From: Tom Hughes Date: Sat, 30 Nov 2013 13:20:31 +0000 (+0000) Subject: Don't throw an exception if the hash doesn't contain a map argument X-Git-Tag: live~4612 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a2b9f593f5e55356e99a310929141495b68b1c3b Don't throw an exception if the hash doesn't contain a map argument --- diff --git a/app/assets/javascripts/osm.js.erb b/app/assets/javascripts/osm.js.erb index 392bf5e0c..c41f040f3 100644 --- a/app/assets/javascripts/osm.js.erb +++ b/app/assets/javascripts/osm.js.erb @@ -115,6 +115,10 @@ OSM = { hash = querystring.parse(hash); + if (!(map in hash)) { + return false; + } + var args = hash.map.split("/"); if (args.length !== 3) { return false;