Skip to content

Commit

Permalink
Fix: admin UI redirects aren't followed correctly (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Dickinson authored Oct 12, 2024
1 parent e6fa304 commit dc2f0f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/meshweb/static/admin/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ async function updateAdminContent(newUrl, options, updateHistory = true) {
return;
}

if (updateHistory) window.history.pushState(null, '', newUrl);
if (updateHistory) {
if (response.redirected) {
window.history.pushState(null, '', response.url)
} else {
window.history.pushState(null, '', newUrl);
}
}

const current_map = document.getElementById("map");

Expand Down

0 comments on commit dc2f0f3

Please sign in to comment.