2
0

fix(bot): 🚑️ Stripe form isn't showing

This commit is contained in:
Baptiste Arnaud
2022-06-16 10:48:06 +02:00
parent 46900ac6df
commit 0dd607bcdf

View File

@ -42,8 +42,9 @@ export const StripePaymentForm = ({ options, onSuccess }: Props) => {
description: error.name + ' ' + error.message,
details: error.message,
})
if (!data || !frameDocument || !frameWindow?.Stripe) return
if (!data || !frameDocument) return
await initStripe(frameDocument)
if (!frameWindow?.Stripe) return
setStripe(frameWindow.Stripe(data.publicKey))
setClientSecret(data.clientSecret)
setAmountLabel(data.amountLabel)