From 0d5f80ff5cd525b8f27adfb84cef67d90e3d7f10 Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Sat, 8 Feb 2025 00:17:32 -0800 Subject: [PATCH] Check if client.workspace is not undefined or null. (#765) --- 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 3969581..a29b200 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); }} />