Skip to content

Commit

Permalink
Small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Nov 28, 2024
1 parent 334d3eb commit cd3c4d8
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ export function KlarnaWidget({ sdkData, paymentMethodType, payButton, ...props }
* Alternatively, we *never* define the callback function; and *always* initialise the widget ourselves once the script is loaded
* (Checking with Klarna on whether defining this callback is advised/mandatory)
*/
let initOnLoad = false;
if (window.klarnaAsyncCallback) {
initOnLoad = true;
}
const initOnLoad = !!window.klarnaAsyncCallback;

window.klarnaAsyncCallback = function () {
console.log('### KlarnaWidget::klarnaWidget:: klarna async function called');
Expand Down

0 comments on commit cd3c4d8

Please sign in to comment.