@economist/web-apple-pay 1.7.8 → 1.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +69 -81
- package/dist/src/apple-pay-button.js +69 -81
- package/dist/src/apple-pay-button.stories.js +69 -81
- package/dist/src/apple-pay-modal.d.ts +9 -14
- package/dist/src/apple-pay-modal.js +36 -44
- package/dist/src/apple-pay-modal.stories.js +69 -81
- package/dist/src/clients/payment-checkout/apple-session.d.ts +1 -0
- package/dist/src/clients/payment-checkout/apple-session.js +11 -6
- package/dist/src/clients/payment-checkout/detects.js +1 -1
- package/dist/src/index.js +69 -81
- package/dist/src/utils/recaptcha.d.ts +9 -3
- package/dist/src/utils/recaptcha.js +6 -5
- package/package.json +1 -1
|
@@ -11,10 +11,9 @@ var loadRecaptchaScript = (siteKey) => {
|
|
|
11
11
|
);
|
|
12
12
|
if (existingScript) {
|
|
13
13
|
existingScript.addEventListener("load", () => resolve());
|
|
14
|
-
existingScript.addEventListener(
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
);
|
|
14
|
+
existingScript.addEventListener("error", () => {
|
|
15
|
+
reject(new Error("Failed to load existing reCAPTCHA script"));
|
|
16
|
+
});
|
|
18
17
|
return;
|
|
19
18
|
}
|
|
20
19
|
const script = document.createElement("script");
|
|
@@ -22,7 +21,9 @@ var loadRecaptchaScript = (siteKey) => {
|
|
|
22
21
|
script.async = true;
|
|
23
22
|
script.defer = true;
|
|
24
23
|
script.onload = () => resolve();
|
|
25
|
-
script.onerror = () =>
|
|
24
|
+
script.onerror = () => {
|
|
25
|
+
reject(new Error("Failed to load reCAPTCHA script"));
|
|
26
|
+
};
|
|
26
27
|
document.head.appendChild(script);
|
|
27
28
|
});
|
|
28
29
|
};
|