1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-10 07:22:27 +03:00

Truthiness not null check

Co-Authored-By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
David Baker
2019-08-16 19:41:37 +01:00
committed by GitHub
parent 2e91200136
commit 6843d86ecf

View File

@@ -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;