feat: resolved type error

This commit is contained in:
=
2024-08-30 10:52:46 +05:30
parent 55b36b033e
commit 01d24291f2
@@ -410,7 +410,7 @@ export const expandSecretReferencesFactory = ({
}; };
const recursivelyExpandSecret = async (dto: { value?: string; secretPath: string; environment: string }) => { const recursivelyExpandSecret = async (dto: { value?: string; secretPath: string; environment: string }) => {
if (!value) return ""; if (!dto.value) return "";
const stack = [{ ...dto, depth: 0 }]; const stack = [{ ...dto, depth: 0 }];
let expandedValue = dto.value; let expandedValue = dto.value;
@@ -419,7 +419,7 @@ export const expandSecretReferencesFactory = ({
const { value, secretPath, environment, depth } = stack.pop()!; const { value, secretPath, environment, depth } = stack.pop()!;
// eslint-disable-next-line // eslint-disable-next-line
if (depth > MAX_SECRET_REFERENCE_DEPTH) continue; if (depth > MAX_SECRET_REFERENCE_DEPTH) continue;
const refs = value.match(INTERPOLATION_SYNTAX_REG); const refs = value?.match(INTERPOLATION_SYNTAX_REG);
if (refs) { if (refs) {
for (const interpolationSyntax of refs) { for (const interpolationSyntax of refs) {