Fix compilation with strictNullChecks: true

This commit is contained in:
Paul Munteanu
2021-05-23 05:43:45 +03:00
parent efbb00e7ba
commit 14523cf897
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ export async function Send(socket: WebSocket, data: Payload) {
if (socket.encoding === "etf") buffer = erlpack.pack(data);
// TODO: encode circular object
else if (socket.encoding === "json") buffer = JSON.stringify(data);
else return;
// TODO: compression
if (socket.deflate) {
socket.deflate.write(buffer);