Check if client.workspace is not undefined or null. (#765)
This commit is contained in:
@@ -145,7 +145,7 @@ export const WorkspaceModule = ({ monitor }: WorkspaceModuleProps): JSX.Element
|
||||
monitor,
|
||||
)}
|
||||
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);
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user