diff --git a/package.json b/package.json index d061533..9b505d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "colyseus.js", - "version": "0.15.21", + "version": "0.15.22", "description": "Colyseus Multiplayer SDK for JavaScript/TypeScript", "author": "Endel Dreyer", "license": "MIT", diff --git a/src/HTTP.ts b/src/HTTP.ts index e72f23b..daa75a7 100644 --- a/src/HTTP.ts +++ b/src/HTTP.ts @@ -28,7 +28,7 @@ export class HTTP { const status = e.statusCode; // || -1 const message = e.data?.error || e.statusMessage || e.message; // || "offline" - if (status === undefined && message === undefined) { + if (!status && !message) { throw e; }