From dd93a07c0f89d6be1b297d23a3d22ac9c6588498 Mon Sep 17 00:00:00 2001 From: tamaina Date: Mon, 19 Dec 2022 16:31:21 +0000 Subject: [PATCH] fix(client): fix script id of Captcha --- packages/client/src/components/MkCaptcha.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/MkCaptcha.vue b/packages/client/src/components/MkCaptcha.vue index b399bb892..6d218389f 100644 --- a/packages/client/src/components/MkCaptcha.vue +++ b/packages/client/src/components/MkCaptcha.vue @@ -62,14 +62,16 @@ const src = computed(() => { } }); +const scriptId = computed(() => `script-${props.provider}`) + const captcha = computed(() => window[variable.value] || {} as unknown as Captcha); if (loaded) { available.value = true; } else { - (document.getElementById(props.provider) || document.head.appendChild(Object.assign(document.createElement('script'), { + (document.getElementById(scriptId.value) || document.head.appendChild(Object.assign(document.createElement('script'), { async: true, - id: props.provider, + id: scriptId.value, src: src.value, }))) .addEventListener('load', () => available.value = true);