From ffceca91a1d39e435c517cd5d3ba9055b15100d3 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Mon, 16 Sep 2024 17:25:43 +0100 Subject: [PATCH] fix: nodejs compatibility fixes --- lib/brain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/brain.js b/lib/brain.js index 5e702d0e4..c2ed6fc21 100644 --- a/lib/brain.js +++ b/lib/brain.js @@ -2134,7 +2134,7 @@ Brain.prototype.isTierCompliant = function isTierCompliant (tier, triggerTx, req const complianceResult = customer.externalCompliance const service = trigger.externalService - switch (complianceResult[service]?.answer) { + switch (complianceResult[service] && complianceResult[service].answer) { case 'APPROVED': return true case 'REJECTED':