From f6fe3446435dcc32e5c78c031c79367ab1acc771 Mon Sep 17 00:00:00 2001 From: azlam Date: Thu, 14 Sep 2023 19:30:30 +1000 Subject: [PATCH] fix(apextests): only attempt to dereference status, when value exists prevent derefrencing a value when saleforce api might not provide the correct status fixes #1408 --- packages/core/src/apextest/TriggerApexTests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/apextest/TriggerApexTests.ts b/packages/core/src/apextest/TriggerApexTests.ts index 7fcd0ae89..495e7844d 100644 --- a/packages/core/src/apextest/TriggerApexTests.ts +++ b/packages/core/src/apextest/TriggerApexTests.ts @@ -722,7 +722,7 @@ export class ProgressReporter implements Progress { 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]++;