diff --git a/types/netease-captcha/netease-captcha-tests.ts b/types/netease-captcha/netease-captcha-tests.ts index c174affdf0..ee73302cc1 100644 --- a/types/netease-captcha/netease-captcha-tests.ts +++ b/types/netease-captcha/netease-captcha-tests.ts @@ -13,8 +13,11 @@ const config: NeteaseCaptcha.Config = { const onLoad: NeteaseCaptcha.onLoad = (instance: NeteaseCaptcha.Instance) => { instance.refresh(); instance.destroy(); + if (instance.popUp) { + instance.popUp(); + } }; -function init(initNECaptcha: NeteaseCaptcha.InitFunction): void { - initNECaptcha(config, onLoad); +if (window.initNECaptcha) { + window.initNECaptcha(config, onLoad); }