Conform more code to strictNullChecks (#10383

* Update matrix-widget-api

* Conform more code to `strictNullChecks`

* Iterate
This commit is contained in:
Michael Telatynski 2023-03-16 10:35:17 +00:00 committed by GitHub
parent aae9dfbb7d
commit 9c816bb720
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 112 additions and 93 deletions

View file

@ -103,11 +103,11 @@ export const usePublicRoomDirectory = (): {
if (query || roomTypes) {
opts.filter = {
generic_search_term: query,
room_types: (await MatrixClientPeg.get().doesServerSupportUnstableFeature(
"org.matrix.msc3827.stable",
))
? Array.from<RoomType | null>(roomTypes)
: undefined,
room_types:
roomTypes &&
(await MatrixClientPeg.get().doesServerSupportUnstableFeature("org.matrix.msc3827.stable"))
? Array.from<RoomType | null>(roomTypes)
: undefined,
};
}