Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add default return on getImportReplicatedFolder

Carlos Monastyrski22bff72c2af3
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx
index ab4a968d96..763872e9e3 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretImportListView/SecretImportListView.tsx
@@ -130,7 +130,7 @@ export const SecretImportListView = ({
const [items, setItems] = useState(secretImports ?? []);
const getImportReplicatedFolder = (importPath: string) => {
- if (!importPath.includes("/__reserve_replication_")) return importPath;
+ if (!importPath.includes("/__reserve_replication_")) return undefined;
const cleanImportPath = importPath.split("/__reserve_replication_")[1];
const replicatedFolder = items?.find(({ id }) => id === cleanImportPath);
return replicatedFolder;