mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 07:26:45 +00:00
Fix getImportReplicatedFolder function to retrieve only the id part of it
This commit is contained in:
+2
-1
@@ -130,7 +130,8 @@ export const SecretImportListView = ({
|
|||||||
const [items, setItems] = useState(secretImports ?? []);
|
const [items, setItems] = useState(secretImports ?? []);
|
||||||
|
|
||||||
const getImportReplicatedFolder = (importPath: string) => {
|
const getImportReplicatedFolder = (importPath: string) => {
|
||||||
const cleanImportPath = importPath.replace("/__reserve_replication_", "");
|
if (!importPath.includes("/__reserve_replication_")) return;
|
||||||
|
const cleanImportPath = importPath.split("/__reserve_replication_")[1];
|
||||||
const replicatedFolder = items?.find(({ id }) => id === cleanImportPath);
|
const replicatedFolder = items?.find(({ id }) => id === cleanImportPath);
|
||||||
return replicatedFolder;
|
return replicatedFolder;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user