Skip to content

Commit

Permalink
fix: resolves clientside error
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Jan 17, 2024
1 parent 3423809 commit ffe79f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Donations/PaymentMethods/PaymentRequestCustomButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ export const PaymentRequestCustomButton = ({
);
}
return () => {
if (paymentRequest) {
if (
paymentRequest &&
paymentRequest.hasRegisteredListener("paymentmethod")
) {
paymentRequest.off("paymentmethod", () => {
setPaymentLoading(false);
});
Expand Down

0 comments on commit ffe79f3

Please sign in to comment.