Merge pull request #6821 from matrix-org/t3chguy/fix/npe1

This commit is contained in:
Michael Telatynski 2021-09-17 10:17:19 +01:00 committed by GitHub
commit 6e508e6a9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -576,7 +576,7 @@ const SpaceHierarchy = ({
const { loading, rooms, hierarchy, loadMore } = useSpaceSummary(space);
const filteredRoomSet = useMemo<Set<IHierarchyRoom>>(() => {
if (!rooms.length) return new Set();
if (!rooms?.length) return new Set();
const lcQuery = query.toLowerCase().trim();
if (!lcQuery) return new Set(rooms);