From 1a698111a4ab5464ec000e59179a0083669dbc6d Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 29 Jun 2022 00:36:06 +0900 Subject: [PATCH] refactor(client): remove invalid computed --- packages/client/src/components/captcha.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/captcha.vue b/packages/client/src/components/captcha.vue index 183658471b..7360734914 100644 --- a/packages/client/src/components/captcha.vue +++ b/packages/client/src/components/captcha.vue @@ -51,7 +51,7 @@ const variable = computed(() => { } }); -const loaded = computed(() => !!window[variable.value]); +const loaded = !!window[variable.value]; const src = computed(() => { switch (props.provider) { @@ -62,7 +62,7 @@ const src = computed(() => { const captcha = computed(() => window[variable.value] || {} as unknown as Captcha); -if (loaded.value) { +if (loaded) { available.value = true; } else { (document.getElementById(props.provider) || document.head.appendChild(Object.assign(document.createElement('script'), { @@ -74,7 +74,7 @@ if (loaded.value) { } function reset() { - if (captcha.value?.reset) captcha.value.reset(); + if (captcha.value.reset) captcha.value.reset(); } function requestRender() {