From a2b9f593f5e55356e99a310929141495b68b1c3b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 30 Nov 2013 13:20:31 +0000 Subject: [PATCH] Don't throw an exception if the hash doesn't contain a map argument --- app/assets/javascripts/osm.js.erb | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.5