Fix useUnreadNotifications exploding with falsey room, like in notif panel (#10030)
This commit is contained in:
committed by
GitHub
parent
e2af97c4de
commit
262c2fcff2
@@ -1348,7 +1348,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
||||
)}
|
||||
|
||||
{msgOption}
|
||||
<UnreadNotificationBadge room={room} threadId={this.props.mxEvent.getId()} />
|
||||
<UnreadNotificationBadge room={room || undefined} threadId={this.props.mxEvent.getId()} />
|
||||
</>,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import { useUnreadNotifications } from "../../../../hooks/useUnreadNotifications
|
||||
import { StatelessNotificationBadge } from "./StatelessNotificationBadge";
|
||||
|
||||
interface Props {
|
||||
room: Room;
|
||||
room?: Room;
|
||||
threadId?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user