Fix undefined environment
This commit is contained in:
parent
a1176686f1
commit
0c0bc0e6c6
3 changed files with 3 additions and 3 deletions
2
lib/actions-util.js
generated
2
lib/actions-util.js
generated
|
|
@ -363,7 +363,7 @@ exports.getAutomationID = getAutomationID;
|
||||||
function computeAutomationID(analysis_key, environment) {
|
function computeAutomationID(analysis_key, environment) {
|
||||||
let automationID = `${analysis_key}/`;
|
let automationID = `${analysis_key}/`;
|
||||||
// the id has to be deterministic so we sort the fields
|
// the id has to be deterministic so we sort the fields
|
||||||
if (environment) {
|
if (environment !== undefined && environment !== "null") {
|
||||||
const environmentObject = JSON.parse(environment);
|
const environmentObject = JSON.parse(environment);
|
||||||
for (const entry of Object.entries(environmentObject).sort()) {
|
for (const entry of Object.entries(environmentObject).sort()) {
|
||||||
if (typeof entry[1] === "string") {
|
if (typeof entry[1] === "string") {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -439,7 +439,7 @@ export function computeAutomationID(
|
||||||
let automationID = `${analysis_key}/`;
|
let automationID = `${analysis_key}/`;
|
||||||
|
|
||||||
// the id has to be deterministic so we sort the fields
|
// the id has to be deterministic so we sort the fields
|
||||||
if (environment) {
|
if (environment !== undefined && environment !== "null") {
|
||||||
const environmentObject = JSON.parse(environment);
|
const environmentObject = JSON.parse(environment);
|
||||||
for (const entry of Object.entries(environmentObject).sort()) {
|
for (const entry of Object.entries(environmentObject).sort()) {
|
||||||
if (typeof entry[1] === "string") {
|
if (typeof entry[1] === "string") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue