mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 09:06:14 +00:00
fix(web): guard pushState in showSummary to break popstate loop
skip history.pushState when the hash already matches, so popstate -> selectMigrationDevice -> showSummary no longer pushes a duplicate entry that traps browser-Back in an oscillation between identical `#tab-migration?<id>` entries.
This commit is contained in:
@@ -1743,7 +1743,10 @@ async function showSummary(deviceId) {
|
||||
document.getElementById("migration-summary").style.display = "none";
|
||||
return;
|
||||
}
|
||||
history.pushState(null, '', '#tab-migration?' + deviceId);
|
||||
const newHash = '#tab-migration?' + deviceId;
|
||||
if (window.location.hash !== newHash) {
|
||||
history.pushState(null, '', newHash);
|
||||
}
|
||||
const targetUrl = document.getElementById("target-domain").value;
|
||||
|
||||
// Per-field URL overrides (Plan card). The summary endpoint uses
|
||||
|
||||
Reference in New Issue
Block a user