Check if client.workspace is not undefined or null. (#765)

This commit is contained in:
Jas Singh
2025-02-08 00:17:32 -08:00
committed by GitHub
parent 6b846b9709
commit 0d5f80ff5c

View File

@@ -145,7 +145,7 @@ export const WorkspaceModule = ({ monitor }: WorkspaceModuleProps): JSX.Element
monitor, monitor,
)} )}
setup={(self) => { setup={(self) => {
const currentWsClients = clients.filter((client) => client.workspace.id === wsId); const currentWsClients = clients.filter((client) => client?.workspace?.id === wsId);
self.toggleClassName('occupied', currentWsClients.length > 0); self.toggleClassName('occupied', currentWsClients.length > 0);
}} }}
/> />