Skip to content

Commit

Permalink
fix: handle undefined fields
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy committed Dec 11, 2024
1 parent c14b659 commit 2526858
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/artillery/lib/util/prepare-test-execution-plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ async function prepareTestExecutionPlan(inputFiles, flags, _args) {
// is not available at this point in time. Example: target is set to an environment variable
// the value of which is only available at runtime in AWS Fargate
const hasTarget =
script1.config.target ||
script1.config.environments[flags.environment].target;
typeof script1.config.target !== 'undefined' ||
typeof script1.config.environments?.[flags.environment]?.target !==
'undefined';

script1 = await checkConfig(script1, scriptPath, flags);

Expand Down

0 comments on commit 2526858

Please sign in to comment.