@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.
@@ -11,10 +11,9 @@ var loadRecaptchaScript = (siteKey) => {
11
11
  );
12
12
  if (existingScript) {
13
13
  existingScript.addEventListener("load", () => resolve());
14
- existingScript.addEventListener(
15
- "error",
16
- () => reject(new Error("Failed to load existing reCAPTCHA script"))
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 = () => reject(new Error("Failed to load reCAPTCHA script"));
24
+ script.onerror = () => {
25
+ reject(new Error("Failed to load reCAPTCHA script"));
26
+ };
26
27
  document.head.appendChild(script);
27
28
  });
28
29
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@economist/web-apple-pay",
3
3
  "description": "Web component package for Apple Pay checkout UI",
4
- "version": "1.7.8",
4
+ "version": "1.7.10",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",