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

Cannot read properties of undefined (reading 'startsWith') #555

Open
zy598586050 opened this issue Aug 20, 2024 · 2 comments
Open

Cannot read properties of undefined (reading 'startsWith') #555

zy598586050 opened this issue Aug 20, 2024 · 2 comments
Labels

Comments

@zy598586050
Copy link

"@paypal/paypal-js": "^8.1.0"

BUG-DEMO: https://github.com/zy598586050/paypal-bug

@gordonchanhk
Copy link

gordonchanhk commented Aug 21, 2024

Regarding the JS error that happen when you are trying to run loadscript:
Screenshot 2024-08-21 at 18 05 35

As your dev lang is Vue, In your app.vue, div's id="paypal" will form a JS object instance, which conflict with the paypal JS SDK paypal object instance.
image

Change id="paypal" to other id value, such as div id="paypal-container" and change corresponding reference can resolve the issue.

Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Stale label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants