Fix userId narrowing in ChatPanel room resolver
This commit is contained in:
@@ -131,14 +131,14 @@ export function ChatPanel({ dmUserId, spotId, spotRoomName }: ChatPanelProps) {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const userId = user?.id;
|
||||
if (!userId) {
|
||||
if (!user?.id) {
|
||||
setCityRoomId(null);
|
||||
setSpotRoomId(null);
|
||||
setDmRoomId(null);
|
||||
return;
|
||||
}
|
||||
|
||||
const userId = user.id;
|
||||
let cancelled = false;
|
||||
|
||||
async function resolveRooms() {
|
||||
|
||||
Reference in New Issue
Block a user