Call removeNewNoteMarker() only from page.unload()

It was also called from noteCreated() but that triggered page.unload() via OSM.router.route().
This commit is contained in:
Anton Khorev 2024-12-25 05:04:43 +03:00
parent 6cc31259e4
commit 5542858315

View file

@ -158,7 +158,6 @@ OSM.NewNote = function (map) {
createNote(location, text, (feature) => {
content.find("textarea").val("");
addCreatedNoteMarker(feature);
removeNewNoteMarker();
addNoteButton.removeClass("active");
OSM.router.route("/note/" + feature.properties.id);
});