From f1835c914ccfad59e7f0a38abb9a55bbe008cdeb Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 25 Dec 2024 04:19:19 +0300 Subject: [PATCH] Move new note page.pushstate/popstate next to page.load --- app/assets/javascripts/index/new_note.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/index/new_note.js b/app/assets/javascripts/index/new_note.js index c1df93517..0ce77f8ca 100644 --- a/app/assets/javascripts/index/new_note.js +++ b/app/assets/javascripts/index/new_note.js @@ -59,12 +59,6 @@ OSM.NewNote = function (map) { marker.addTo(noteLayer); } - page.pushstate = page.popstate = function (path) { - OSM.loadSidebarContent(path, function () { - page.load(path); - }); - }; - function newHalo(loc, a) { var hasHalo = halo && map.hasLayer(halo); @@ -84,6 +78,12 @@ OSM.NewNote = function (map) { } } + page.pushstate = page.popstate = function (path) { + OSM.loadSidebarContent(path, function () { + page.load(path); + }); + }; + page.load = function (path) { if (addNoteButton.hasClass("disabled")) return; if (addNoteButton.hasClass("active")) return; -- 2.39.5