Skip to content

Commit

Permalink
Fix populateRunAutomationDetails for null environments
Browse files Browse the repository at this point in the history
  • Loading branch information
David Verdeguer committed Apr 16, 2021
1 parent de611b2 commit 0ece0d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/upload-lib.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,10 @@ export function populateRunAutomationDetails(
let automationID = `${analysis_key}/`;

// the id has to be deterministic so we sort the fields
if (environment !== undefined) {
console.log(environment);
if (environment !== undefined && environment !== "null") {
const environmentObject = JSON.parse(environment);
for (const entry of Object.entries(environmentObject).sort()) {
automationID += `${entry[0]}:${entry[1]}/`; //automationID + entry[0] + ':' + entry[1] + '/';
automationID += `${entry[0]}:${entry[1]}/`;
}
}

Expand Down

0 comments on commit 0ece0d0

Please sign in to comment.