diff --git a/static/scripts/socket.js b/static/scripts/socket.js index 514adf0..581b09d 100644 --- a/static/scripts/socket.js +++ b/static/scripts/socket.js @@ -40,7 +40,7 @@ class BrickSocket { if (this.html_button) { this.add_listener = ((bricksocket) => (e) => { - if (!bricksocket.disabled) { + if (!bricksocket.disabled && bricksocket.socket !== undefined && bricksocket.socket.connected) { bricksocket.toggle(false); // Split and save the list if bulk