diff --git a/nightwatch/web/js/flows/connection.js b/nightwatch/web/js/flows/connection.js index 9d72c43..b5dc44f 100644 --- a/nightwatch/web/js/flows/connection.js +++ b/nightwatch/web/js/flows/connection.js @@ -80,7 +80,7 @@ export default class ConnectionManager { break; case "problem": - this.callbacks.on_problem({ type: "protocol", data }); + this.callbacks.on_problem({ type: "generic", data: data.message }); break; } } diff --git a/nightwatch/web/js/nightwatch.js b/nightwatch/web/js/nightwatch.js index a5aee2c..f46be44 100644 --- a/nightwatch/web/js/nightwatch.js +++ b/nightwatch/web/js/nightwatch.js @@ -51,10 +51,6 @@ const FILE_HANDLER = new FileHandler(); case "generic": main.innerHTML = data; break; - - case "protocol": - main.innerHTML = data.message; - break; } if (connection.websocket.readyState === WebSocket.OPEN) { connection.websocket.close(1000, "The client is terminating this connection due to protocol error."); @@ -207,7 +203,6 @@ const FILE_HANDLER = new FileHandler(); } } ); - window.connection = connection; // Handle loading spinner main.classList.add("loading");