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
View File
@@ -21,6 +21,7 @@ export async function Message(this: WebSocket, buffer: Data) {
if (this.encoding === "etf" && buffer instanceof Buffer) data = erlpack.unpack(buffer);
else if (this.encoding === "json" && typeof buffer === "string") data = JSON.parse(buffer);
else return;
check.call(this, PayloadSchema, data);