Skip to content

Commit

Permalink
Chain Errors (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarratt authored Feb 26, 2025
1 parent 93dcd66 commit 73cab60
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-typescript2": "^0.25.3",
"ts-jest": "^24.3.0",
"typescript": "^4.1.2",
"typescript": "~4.8.0",
"zx": "^4.2.0"
}
}
6 changes: 3 additions & 3 deletions src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ const registerWrapper = (stripe: any, startTime: number): void => {

let stripePromise: Promise<StripeConstructor | null> | null = null;

let onErrorListener: (() => void) | null = null;
let onErrorListener: ((cause?: unknown) => void) | null = null;
let onLoadListener: (() => void) | null = null;

const onError = (reject: (reason?: any) => void) => () => {
reject(new Error('Failed to load Stripe.js'));
const onError = (reject: (reason?: any) => void) => (cause?: unknown) => {
reject(new Error('Failed to load Stripe.js', {cause}));
};

const onLoad = (
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5547,10 +5547,10 @@ [email protected]:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==

typescript@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9"
integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==
typescript@~4.8.0:
version "4.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==

unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
Expand Down

0 comments on commit 73cab60

Please sign in to comment.