Merge pull request #4723 from Infisical/fix/getImportReplicatedFolder

Fix: getImportReplicatedFolder function now retrieve only the id of the replicated folder
This commit is contained in:
carlosmonastyrski
2025-10-22 14:51:52 -03:00
committed by GitHub

View File

@@ -130,7 +130,8 @@ export const SecretImportListView = ({
const [items, setItems] = useState(secretImports ?? []);
const getImportReplicatedFolder = (importPath: string) => {
const cleanImportPath = importPath.replace("/__reserve_replication_", "");
if (!importPath.includes("/__reserve_replication_")) return undefined;
const cleanImportPath = importPath.split("/__reserve_replication_")[1];
const replicatedFolder = items?.find(({ id }) => id === cleanImportPath);
return replicatedFolder;
};