Skip to content

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

2 participants