Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SpreeBraintreeVzero loading issues #244

Merged
merged 1 commit into from
Apr 16, 2021
Merged

Fix SpreeBraintreeVzero loading issues #244

merged 1 commit into from
Apr 16, 2021

Conversation

Vegann
Copy link

@Vegann Vegann commented Apr 9, 2021

This PR is fixing the ReferenceError: Can't find variable: SpreeBraintreeVzero issue. Also, it fixes the issue when you can't click the Pay with PayPal button, by waiting for the document to load first.

I am not using the turbolinks:load event because this event triggers multiple times in the site (because it triggers for the original document and for each cached version) and there is no easy way around it.

I was worried about addEventListener with the click because sometimes this script runes twice, but I totally forgot that the browser will not add another event with the same function and the same capture setting.

Closes #228

@damianlegawiec damianlegawiec merged commit 80064b2 into master Apr 16, 2021
vitkx pushed a commit to vitkx/spree_braintree_vzero that referenced this pull request Sep 4, 2024
Fix SpreeBraintreeVzero loading issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template scripts fail to run if "head script" is included with "defer"
2 participants