Skip to content

Commit

Permalink
fix(apextests): only attempt to dereference status, when value exists
Browse files Browse the repository at this point in the history
prevent derefrencing a value when saleforce api might not provide the correct status

fixes dxatscale#1408
  • Loading branch information
azlam-abdulsalam committed Sep 14, 2023
1 parent e7d9bf7 commit f6fe344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/apextest/TriggerApexTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ export class ProgressReporter implements Progress<ApexTestProgressValue> {
if (Date.now() - this.lastExecutedTime > Duration.seconds(30).milliseconds) {
if (value.type == 'TestQueueProgress') {
for (const elem of value.value.records) {
if (elem.Status) {
if (elem?.Status) {
if (!count[elem.Status]) {
count[elem.Status] = 1;
} else count[elem.Status]++;
Expand Down

0 comments on commit f6fe344

Please sign in to comment.