]> git.openstreetmap.org Git - rails.git/commitdiff
L.hash expects parseHash to return false if there isn't a location
authorJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 6 Nov 2013 20:26:25 +0000 (12:26 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Wed, 6 Nov 2013 20:26:32 +0000 (12:26 -0800)
app/assets/javascripts/osm.js.erb

index 59d880efc7913a9fea9854270ca98c58216cbe49..ad6d5cb9cd0785fe3b9b41c892ee93b8d0b0798e 100644 (file)
@@ -104,6 +104,9 @@ OSM = {
     if (hash.indexOf('#') === 0) {
       hash = hash.substr(1);
     }
+    if (hash === '') {
+      return false;
+    }
     hash = querystring.parse(hash);
     var args = L.Hash.parseHash(hash.map || '') || {};
     if (hash.layers) args.layers = hash.layers;