Closed jconleyCB closed 1 year ago
@jconleyCB could you try with 3.0.6? We recently fixed a potentially related issue. We still have to update our own stackblitz examples to use the latest version 😉
Yep its still an issue in 3.0.6. My assumption is that even though the try-catch catches the error for loading the script it continues down to this.updateElement()
and that tries to reference google without it being defined
@jconleyCB found the issue. will submit a fix.
Thank you @dmengelt!
@jconleyCB please use version 3.0.8
@dmengelt So after using version 3.0.8 for a few days I noticed some users still came across the google
being undefined error. Im not sure if the script loading guarantees that google
is available, should a check for google
be added to the updateElement()
, before it's used?
Hi @jconleyCB very good point. Let me have a look at this.
@jconleyCB see #225
Describe the bug A clear and concise description of what the bug is. The issue im seeing is when the google pay script doesnt load, an unhandled exception is thrown instead of passing the error to the
config.onError
.To Reproduce Steps to reproduce the behavior:
https://pay.google.com/gp/p/
Expected behavior A clear and concise description of what you expected to happen. The
updateElement
function should have a check that google is defined before invokingthis.client = new google.payments.api.PaymentsClient(this.createClientOptions(this.config));
Screenshots If applicable, add screenshots to help explain your problem.
Component information:
@google-pay/button-react
)@google-pay/button-element
)@google-pay/button-angular
)Environment:
Additional context Add any other context about the problem here.