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:
@@ -93,7 +93,9 @@
|
||||
Rcon.on('connected', function () {
|
||||
var addr = Rcon.getAddress();
|
||||
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 () {
|
||||
|
||||
Reference in New Issue
Block a user