File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ textarea:focus,
182
182
height : 76px !important ;
183
183
}
184
184
.m-captcha-style {
185
- width : 50 % ;
185
+ max- width: 450 px ;
186
186
}
187
187
}
188
188
Original file line number Diff line number Diff line change @@ -34,13 +34,18 @@ export async function initCaptcha() {
34
34
break ;
35
35
}
36
36
case 'm-captcha' : {
37
- const { default : mCaptcha } = await import ( /* webpackChunkName: "mcaptcha-vanilla-glue" */ '@mcaptcha/vanilla-glue' ) ;
38
- // @ts -expect-error
37
+ const mCaptcha = await import ( /* webpackChunkName: "mcaptcha-vanilla-glue" */ '@mcaptcha/vanilla-glue' ) ;
38
+
39
+ // FIXME: the mCaptcha code is not right, it's a miracle that the wrong code could run
40
+ // * the "vanilla-glue" has some problems with es6 module.
41
+ // * the INPUT_NAME is a "const", it should not be changed.
42
+ // * the "mCaptcha.default" is actually the "Widget".
43
+
44
+ // @ts -expect-error TS2540: Cannot assign to 'INPUT_NAME' because it is a read-only property.
39
45
mCaptcha . INPUT_NAME = 'm-captcha-response' ;
40
46
const instanceURL = captchaEl . getAttribute ( 'data-instance-url' ) ;
41
47
42
- // @ts -expect-error
43
- mCaptcha . default ( {
48
+ new mCaptcha . default ( {
44
49
siteKey : {
45
50
instanceUrl : new URL ( instanceURL ) ,
46
51
key : siteKey ,
You can’t perform that action at this time.
0 commit comments