fix: resolved empty secrets on fresh env and added empty states

This commit is contained in:
akhilmhdh
2023-07-19 21:58:03 +05:30
parent 284608762b
commit 93761f6487
3 changed files with 21 additions and 3 deletions
@@ -38,6 +38,11 @@ export const getAllImportedSecrets = async (
folderId: secPathFolder.id,
secretPath: el.secretPath
});
} else {
if (el.secretPath === "/") {
// this happens when importing with a fresh env without any folders
importedSecByFid.push({ environment: el.environment, folderId: "root", secretPath: "/" });
}
}
});
if (importedSecByFid.length === 0) return [];