You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-11 19:37:30 +03:00
Truthiness not null check
Co-Authored-By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -3426,7 +3426,7 @@ MatrixClient.prototype._requestTokenFromEndpoint = function(endpoint, params) {
|
|||||||
|
|
||||||
if (this.idBaseUrl) {
|
if (this.idBaseUrl) {
|
||||||
const idServerUrl = url.parse(this.idBaseUrl);
|
const idServerUrl = url.parse(this.idBaseUrl);
|
||||||
if (idServerUrl.host === null) {
|
if (!idServerUrl.host) {
|
||||||
throw new Error("Invalid ID server URL: " + this.idBaseUrl);
|
throw new Error("Invalid ID server URL: " + this.idBaseUrl);
|
||||||
}
|
}
|
||||||
postParams.id_server = idServerUrl.host;
|
postParams.id_server = idServerUrl.host;
|
||||||
|
|||||||
Reference in New Issue
Block a user