Skip to content

Commit

Permalink
Prevents constructing elements when already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
joshnuss committed Nov 26, 2023
1 parent bbee6e0 commit 390f062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/Elements.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/** @type {import('@stripe/stripe-js').StripeElements?} */
export let elements = null
$: if (stripe) {
$: if (stripe && !elements) {
elements = stripe.elements({ mode, currency, amount, appearance, clientSecret, fonts, loader, locale })
register(stripe)
Expand Down

1 comment on commit 390f062

@vercel
Copy link

@vercel vercel bot commented on 390f062 Nov 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.