Skip to content

Commit

Permalink
FIX: Fixed CreditCard crashing on attempted cancel (named abort in th…
Browse files Browse the repository at this point in the history
…e script, and not cancel like the rest)
  • Loading branch information
OyvindMathisen committed Apr 30, 2024
1 parent a668880 commit 1c38178
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 1c38178

Please sign in to comment.