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

Allow tonconnect/ui to be created twice #192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisands
Copy link

Currently every time TonConnectUI initialized it tries to add to customElements and when application changes pages and initialized second time it throws an error

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry

I added condition to check if customElements exists.

Not sure, but probably should fix #171
Tested in Solidjs app.

@chrisands chrisands force-pushed the fix/allow-tonconnect-ui-created-twice branch from c03acb3 to 805d5e2 Compare July 13, 2024 15:22
@chrisands
Copy link
Author

@thekiba rebased on main branch. Should be okay now.

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.

[UI-REACT]: Not possible to render <TonConnectButton /> twice
1 participant