Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: hide pagination if table empty and add optional chaining operator to fix invalid imports
Scott Wilson0a1f25a65996
diff --git a/backend/src/services/secret-import/secret-import-fns.ts b/backend/src/services/secret-import/secret-import-fns.tsindex 981a1bf624..b21a6c3ced 100644--- a/backend/src/services/secret-import/secret-import-fns.ts+++ b/backend/src/services/secret-import/secret-import-fns.ts@@ -220,7 +220,7 @@ export const fnSecretsV2FromImports = async ({const secretsFromdeeperImportGroupedByFolderId = groupBy(secretsFromDeeperImports, (i) => i.importFolderId);const processedImports = allowedImports.map(({ importPath, importEnv, id, folderId }, i) => {- const sourceImportFolder = importedFolderGroupBySourceImport[`${importEnv.id}-${importPath}`][0];+ const sourceImportFolder = importedFolderGroupBySourceImport[`${importEnv.id}-${importPath}`]?.[0];const folderDeeperImportSecrets =secretsFromdeeperImportGroupedByFolderId?.[sourceImportFolder?.id || ""]?.[0]?.secrets || [];const secretsWithDuplicate = (importedSecretsGroupByFolderId?.[importedFolders?.[i]?.id as string] || [])diff --git a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsxindex 2f7768100c..180bd5e40e 100644--- a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx+++ b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentityTable.tsx@@ -277,7 +277,7 @@ export const IdentityTable = ({ handlePopUpOpen }: Props) => {})}</TBody></Table>- {!isLoading && data && (+ {!isLoading && data && data.totalCount > 0 && (<Paginationcount={data.totalCount}page={page}diff --git a/frontend/src/views/Project/MembersPage/components/IdentityTab/IdentityTab.tsx b/frontend/src/views/Project/MembersPage/components/IdentityTab/IdentityTab.tsxindex b40f457a36..1f8cc996d3 100644--- a/frontend/src/views/Project/MembersPage/components/IdentityTab/IdentityTab.tsx+++ b/frontend/src/views/Project/MembersPage/components/IdentityTab/IdentityTab.tsx@@ -369,7 +369,7 @@ export const IdentityTab = withProjectPermission(})}</TBody></Table>- {!isLoading && data && (+ {!isLoading && data && data.totalCount > 0 && (<Paginationcount={data.totalCount}page={page}diff --git a/frontend/src/views/SecretMainPage/SecretMainPage.tsx b/frontend/src/views/SecretMainPage/SecretMainPage.tsxindex 08f4bb87fe..aa6804511a 100644--- a/frontend/src/views/SecretMainPage/SecretMainPage.tsx+++ b/frontend/src/views/SecretMainPage/SecretMainPage.tsx@@ -358,7 +358,7 @@ export const SecretMainPage = () => {{!canReadSecret && folders?.length === 0 && <PermissionDeniedBanner />}</div></div>- {!isDetailsLoading && (+ {!isDetailsLoading && totalCount > 0 && (<PaginationstartAdornment={<SecretTableResourceCountdiff --git a/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx b/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsxindex 451133c23c..d047c19eea 100644--- a/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx+++ b/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx@@ -953,7 +953,7 @@ export const SecretOverviewPage = () => {</Tr></TFoot></Table>- {!isOverviewLoading && (+ {!isOverviewLoading && totalCount > 0 && (<PaginationstartAdornment={<SecretTableResourceCount