From 90a0a0257ec0b38a605487069e15e19aaac3f80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Wed, 29 Apr 2020 06:09:17 +0900 Subject: [PATCH] Refactor code --- src/client/components/hcaptcha.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/components/hcaptcha.vue b/src/client/components/hcaptcha.vue index f49336648..4bc03342f 100644 --- a/src/client/components/hcaptcha.vue +++ b/src/client/components/hcaptcha.vue @@ -40,11 +40,11 @@ export default Vue.extend({ if (window.hcaptcha) { // loaded this.available = true; } else { - (document.getElementById('hcaptcha') || (x => document.head.appendChild(Object.assign(x, { + (document.getElementById('hcaptcha') || document.head.appendChild(Object.assign(document.createElement('script'), { async: true, id: 'hcaptcha', src: 'https://hcaptcha.com/1/api.js?render=explicit', - })))(document.createElement('script'))) + }))) .addEventListener('load', () => this.available = true); } },