diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx index 1a1df64e3752..56606711db98 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/table.tsx @@ -243,8 +243,8 @@ export class Table extends PureComponent { if (currentWorkspaceId) { inAppUrl = formatUrlWithWorkspaceId(path, currentWorkspaceId, basePath); } else { - // first workspace user have permission - const [workspaceId] = object.workspaces.filter((wsId) => visibleWsIds.includes(wsId)); + // find first workspace user have permission + const workspaceId = object.workspaces.find((wsId) => visibleWsIds.includes(wsId)); if (workspaceId) { inAppUrl = formatUrlWithWorkspaceId(path, workspaceId, basePath); }