Skip to content

Commit

Permalink
Null check socket error event
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Jan 10, 2024
1 parent f31428d commit 9b5830e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GobanSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class GobanSocket<

socket.addEventListener("error", (event: Event) => {
if (!this.manually_disconnected) {
console.error(`GobanSocket error ${(event as any).message}`);
console.error(`GobanSocket error ${(event as any)?.message || event}`);
}
/*
if (!this.connected) {
Expand Down

0 comments on commit 9b5830e

Please sign in to comment.