mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 14:27:59 +00:00
Add default return on getImportReplicatedFolder
This commit is contained in:
+1
-1
@@ -130,7 +130,7 @@ export const SecretImportListView = ({
|
|||||||
const [items, setItems] = useState(secretImports ?? []);
|
const [items, setItems] = useState(secretImports ?? []);
|
||||||
|
|
||||||
const getImportReplicatedFolder = (importPath: string) => {
|
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 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