Do nothing if the socket is not connected
This commit is contained in:
parent
7b682e5859
commit
5fa51c21a9
@ -40,7 +40,7 @@ class BrickSocket {
|
|||||||
|
|
||||||
if (this.html_button) {
|
if (this.html_button) {
|
||||||
this.add_listener = ((bricksocket) => (e) => {
|
this.add_listener = ((bricksocket) => (e) => {
|
||||||
if (!bricksocket.disabled) {
|
if (!bricksocket.disabled && bricksocket.socket !== undefined && bricksocket.socket.connected) {
|
||||||
bricksocket.toggle(false);
|
bricksocket.toggle(false);
|
||||||
|
|
||||||
// Split and save the list if bulk
|
// Split and save the list if bulk
|
||||||
|
Loading…
Reference in New Issue
Block a user