Bug report
Describe the bug
i am using the below stripe version and integrated payment request button, however got a error canMakePayment returun null or false .. as the promise is showing as undefined.
"@stripe/react-stripe-js": "^1.6.0",
"@stripe/stripe-js": "^1.19.1",
TypeError: o.canMakePayment().then((function(t){t&&e&&l(!0)})).finally is not a function. (In
'o.canMakePayment().then((function(t){t&&e&&l(!0)})).finally((function(){p(!1)}))', 'o.canMakePayment().then(
(function(t){t&&e&&l(!0)})).finally' is undefin...
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
It should return promise in every case to make the return consistent, and if its not supported then it should throw an error that could be catched in promise
System information
- browser: Mobile Safari 10.0
- browser.name: Mobile Safari
- device.family: iPad
- os: iOS 10.3.3
- Server environment: Node
Additional context
this is the code i am using to check the canMakePayment on the payementRequest
if (paymentRequest) {
paymentRequest
.canMakePayment()
.then((res) => {
if (res && subscribed) {
setCanMakePayment(true);
}
})
.finally(() => {
setPaymentLoading(false);
});
}
Got this exception on my client using sentry..
TypeError: o.canMakePayment().then((function(t){t&&e&&l(!0)})).finally is not a function. (In
'o.canMakePayment().then((function(t){t&&e&&l(!0)})).finally((function(){p(!1)}))', 'o.canMakePayment().then((
function(t) {t&&e&&l(!0)})).finally' is undefined.