From 1c38178623d950f8edd5f043810032312238ca55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Mathisen?= Date: Tue, 30 Apr 2024 12:46:00 +0200 Subject: [PATCH] FIX: Fixed CreditCard crashing on attempted cancel (named abort in the script, and not cancel like the rest) --- app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 2ce071f..a844ab4 100644 --- a/app.js +++ b/app.js @@ -160,7 +160,11 @@ function closeScript() { function cancelScript() { if (instrument) { addLogText("cancel() called"); - instrument.cancel(); + // CreditCard calls cancel for "abort". Fallback to avoid crash + if (typeof instrument.cancel === "function") + instrument.cancel(); + else + instrument.abort(); } }