fix: empty server page on reload with cached connection

Router.go() sets window.location.hash, but when the hash already
matches (e.g. F5 reload at /#/addr/info then clicking a saved
connection), hashchange doesn't fire and the router never re-renders.
Switched to Router.navigate() which processes the route directly
regardless of current hash.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-06-13 18:26:08 +02:00
co-authored by Copilot
parent ae9176656b
commit f4e7dd5bb6
+3 -1
View File
@@ -93,7 +93,9 @@
Rcon.on('connected', function () { Rcon.on('connected', function () {
var addr = Rcon.getAddress(); var addr = Rcon.getAddress();
showConnected(addr); showConnected(addr);
Router.go('#/' + addr + '/info'); // navigate() directly so it works even when the hash already matches
// (e.g. F5 reload then clicking a saved connection)
Router.navigate('#/' + addr + '/info');
}); });
Rcon.on('disconnected', function () { Rcon.on('disconnected', function () {