From d4676c884f814bdf59ed9b5b92916aa2169bd71d Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 2 Apr 2025 02:03:00 +0300 Subject: [PATCH] Use fetch when loading more changesets in history --- app/assets/javascripts/index/history.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/index/history.js b/app/assets/javascripts/index/history.js index 9f883367a..c9810332d 100644 --- a/app/assets/javascripts/index/history.js +++ b/app/assets/javascripts/index/history.js @@ -182,11 +182,14 @@ OSM.History = function (map) { $(this).hide(); div.find(".loader").show(); - $.get($(this).attr("href"), function (html) { - displayMoreChangesets(div, html); - enableChangesetIntersectionObserver(); - updateMap(); - }); + fetch($(this).attr("href")) + .then(response => response.text()) + .then(function (html) { + displayMoreChangesets(div, html); + enableChangesetIntersectionObserver(); + + updateMap(); + }); } function reloadChangesetsBecauseOfMapMovement() { -- 2.39.5