Ignore non-string values in populateRunAutomationDetails

This commit is contained in:
David Verdeguer 2021-04-20 12:53:16 +02:00
parent 8bd2b3516b
commit 496bf0ec11
6 changed files with 34 additions and 6 deletions

View file

@ -56,7 +56,13 @@ export function populateRunAutomationDetails(
if (environment !== undefined && environment !== "null") {
const environmentObject = JSON.parse(environment);
for (const entry of Object.entries(environmentObject).sort()) {
automationID += `${entry[0]}:${entry[1]}/`;
if (typeof entry[1] === "string") {
automationID += `${entry[0]}:${entry[1]}/`;
} else {
// In code scanning we just handle the string values,
// the rest get converted to the empty string
automationID += `${entry[0]}:/`;
}
}
}