From 6843d86ecf2ec905559bb0d38aa40d830563e7d0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 16 Aug 2019 19:41:37 +0100 Subject: [PATCH] Truthiness not null check Co-Authored-By: Travis Ralston --- src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index 7dd219f80..1a3904262 100644 --- a/src/client.js +++ b/src/client.js @@ -3426,7 +3426,7 @@ MatrixClient.prototype._requestTokenFromEndpoint = function(endpoint, params) { if (this.idBaseUrl) { const idServerUrl = url.parse(this.idBaseUrl); - if (idServerUrl.host === null) { + if (!idServerUrl.host) { throw new Error("Invalid ID server URL: " + this.idBaseUrl); } postParams.id_server = idServerUrl.host;