mirror of https://github.com/vector-im/riot-web
Merge pull request #6821 from matrix-org/t3chguy/fix/npe1
commit
6e508e6a9a
|
@ -576,7 +576,7 @@ const SpaceHierarchy = ({
|
||||||
const { loading, rooms, hierarchy, loadMore } = useSpaceSummary(space);
|
const { loading, rooms, hierarchy, loadMore } = useSpaceSummary(space);
|
||||||
|
|
||||||
const filteredRoomSet = useMemo<Set<IHierarchyRoom>>(() => {
|
const filteredRoomSet = useMemo<Set<IHierarchyRoom>>(() => {
|
||||||
if (!rooms.length) return new Set();
|
if (!rooms?.length) return new Set();
|
||||||
const lcQuery = query.toLowerCase().trim();
|
const lcQuery = query.toLowerCase().trim();
|
||||||
if (!lcQuery) return new Set(rooms);
|
if (!lcQuery) return new Set(rooms);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue