mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Updated Stripe JS to load async in head
no issue - Stripe JS is added to a theme via ghost_head if a Stripe account is connected to members enabled site - Previously, the script was not loading async which blocked the main thread, changes the script load to async to avoid rendering block - Members script is already being loaded with `defer` so does not block the main thread
This commit is contained in:
parent
f8f0f76788
commit
1a6eec40d1
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ function getMembersHelper() {
|
|||
membersHelper = `<script defer src="https://unpkg.com/@tryghost/members-js@latest/umd/members.min.js" data-ghost="${urlUtils.getSiteUrl()}"></script>`;
|
||||
}
|
||||
if ((!!stripeDirectSecretKey && !!stripeDirectPublishableKey) || !!stripeConnectAccountId) {
|
||||
membersHelper += '<script src="https://js.stripe.com/v3/"></script>';
|
||||
membersHelper += '<script async src="https://js.stripe.com/v3/"></script>';
|
||||
}
|
||||
return membersHelper;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue