Commit cd225d7 1 parent e6759f3 commit cd225d7 Copy full SHA for cd225d7
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 @@ -243,7 +243,7 @@ textarea:focus,
243
243
height : 76px !important ;
244
244
}
245
245
.m-captcha-style {
246
- width : 50 % ;
246
+ max- width: 450 px ;
247
247
}
248
248
}
249
249
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