Skip to content

Commit

Permalink
fix: add try/catch around prefetchPaymentData
Browse files Browse the repository at this point in the history
  • Loading branch information
Soc Sieng committed Jun 24, 2020
1 parent 27a1d82 commit be06a76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/button-manager.ts
Expand Up @@ -244,7 +244,11 @@ export class ButtonManager {
if (!this.isMounted()) return;

if (showButton) {
this.client.prefetchPaymentData(this.createLoadPaymentDataRequest(this.config));
try {
this.client.prefetchPaymentData(this.createLoadPaymentDataRequest(this.config));
} catch (err) {
console.log('Error with prefetch', err);
}

// remove hidden className
this.setClassName(
Expand Down

0 comments on commit be06a76

Please sign in to comment.