From 3807e12305cd0a2b5407dcb5bf6b6677029224b6 Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Sat, 8 Feb 2025 00:16:26 -0800 Subject: [PATCH] Check if client.workspace is not undefined or null. --- src/components/bar/modules/workspaces/workspaces.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/bar/modules/workspaces/workspaces.tsx b/src/components/bar/modules/workspaces/workspaces.tsx index 39695817..a29b2009 100644 --- a/src/components/bar/modules/workspaces/workspaces.tsx +++ b/src/components/bar/modules/workspaces/workspaces.tsx @@ -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); }} />