diff --git a/src/index.tsx b/src/index.tsx index 69819fe..e0fefc6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -370,9 +370,13 @@ export class LikeCoinWalletConnector { { - setTimeout(() => { - initAuthcore(this.options, { containerId, initialScreen }); - }, 100); + const intervalId = setInterval(() => { + const containerElement = document.getElementById(containerId); + if (containerElement) { + initAuthcore(this.options, { containerId, initialScreen }); + clearInterval(intervalId); + } + }, 200); }} onClose={() => { this.closeDialog();