Skip to content

Commit

Permalink
fix crash on bad message
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Oct 12, 2024
1 parent 2ac389b commit a2a7334
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/boardData.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ class BoardData {
break;
default:
//Add data
if (!id) throw new Error("Invalid message: ", message);
this.set(id, message);
if (id) this.set(id, message);
else console.error("Invalid message: ", message);
}
}

Expand Down

0 comments on commit a2a7334

Please sign in to comment.