From d025e6fb809c6e85f0f3444aae2ae39f744502ad Mon Sep 17 00:00:00 2001 From: sD Date: Sat, 21 Mar 2020 17:36:28 +0100 Subject: fix #43 by clearing it on dead connection --- webAO/client.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'webAO') diff --git a/webAO/client.js b/webAO/client.js index 4facca7..6fda3fc 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -478,6 +478,11 @@ class Client extends EventEmitter { */ cleanup() { clearInterval(this.checkUpdater); + + // the connection got rekt, get rid of the old musiclist + document.getElementById("areas").innerHTML = ""; + document.getElementById("client_musiclist").innerHTML = ""; + document.getElementById("client_chartable").innerHTML = ""; } /** @@ -2166,7 +2171,9 @@ export function ReconnectButton() { client = new Client(serverIP); if (client) { mode = "join"; // HACK: see client.onOpen + document.getElementById("client_error").style.display = "none"; + } } window.ReconnectButton = ReconnectButton; -- cgit