Ensure object parameter is removed from edit link when closing sidebar
authorJohn Firebaugh <john.firebaugh@gmail.com>
Thu, 5 Dec 2013 19:27:47 +0000 (11:27 -0800)
committerTom Hughes <tom@compton.nu>
Thu, 5 Dec 2013 19:38:34 +0000 (19:38 +0000)
Refs #620

app/assets/javascripts/application.js

index 37172f4398849e9bc990ac5f5c77d3375e07e159..6a4fdf6ab60dabf3f6d9730749b5447fc700f91d 100644 (file)
@@ -64,12 +64,12 @@ function updateLinks(loc, zoom, layers, object) {
       args = querystring.parse(link.search.substring(1)),
       editlink = $(link).hasClass("editlink");
 
-    if (object && editlink) {
-      delete args['node'];
-      delete args['way'];
-      delete args['relation'];
-      delete args['changeset'];
+    delete args['node'];
+    delete args['way'];
+    delete args['relation'];
+    delete args['changeset'];
 
+    if (object && editlink) {
       args[object.type] = object.id;
     }