Make more of the codebase conform to strict types (#10857)

This commit is contained in:
Michael Telatynski 2023-05-16 14:25:43 +01:00 committed by GitHub
parent 7f017a84c2
commit 6a3f59cc76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 127 additions and 121 deletions

View file

@ -16,6 +16,7 @@ limitations under the License.
import { IThreepid, ThreepidMedium } from "matrix-js-sdk/src/@types/threepids";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { MatrixError } from "matrix-js-sdk/src/http-api";
import IdentityAuthClient from "./IdentityAuthClient";
@ -57,7 +58,7 @@ export async function getThreepidsWithBindStatus(
}
} catch (e) {
// Ignore terms errors here and assume other flows handle this
if (e.errcode !== "M_TERMS_NOT_SIGNED") {
if (!(e instanceof MatrixError) || e.errcode !== "M_TERMS_NOT_SIGNED") {
throw e;
}
}