chore: cleanup linter (#797)

This commit is contained in:
Carlos Valente
2024-03-01 23:19:05 +01:00
committed by GitHub
parent 5b01329c37
commit d87ba12b2e
4 changed files with 6 additions and 5 deletions
@@ -62,9 +62,9 @@ export function parseTemplateNested(template: string, state: object, humanReadab
}
} else {
// iterate through variable parts, and look for the property in the state object
value = variableParts.reduce((obj, key) => obj && obj[key], state);
value = variableParts.reduce((obj, key) => obj?.[key], state);
}
if (typeof value !== 'undefined') {
if (value !== undefined) {
parsedTemplate = parsedTemplate.replace(match[0], value);
}
}