mirror of
https://github.com/github/codeql-action
synced 2026-05-31 00:00:46 +03:00
Fix undefined environment
This commit is contained in:
Generated
+1
-1
@@ -363,7 +363,7 @@ exports.getAutomationID = getAutomationID;
|
||||
function computeAutomationID(analysis_key, environment) {
|
||||
let automationID = `${analysis_key}/`;
|
||||
// the id has to be deterministic so we sort the fields
|
||||
if (environment) {
|
||||
if (environment !== undefined && environment !== "null") {
|
||||
const environmentObject = JSON.parse(environment);
|
||||
for (const entry of Object.entries(environmentObject).sort()) {
|
||||
if (typeof entry[1] === "string") {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -439,7 +439,7 @@ export function computeAutomationID(
|
||||
let automationID = `${analysis_key}/`;
|
||||
|
||||
// the id has to be deterministic so we sort the fields
|
||||
if (environment) {
|
||||
if (environment !== undefined && environment !== "null") {
|
||||
const environmentObject = JSON.parse(environment);
|
||||
for (const entry of Object.entries(environmentObject).sort()) {
|
||||
if (typeof entry[1] === "string") {
|
||||
|
||||
Reference in New Issue
Block a user