File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,19 @@ export class BaseForm extends LitElement {
7878 return this . captchaEnabled && ! this . currentUser && this . allowAnonymousComments ;
7979 }
8080
81+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
82+ override updated ( changedProperties : Map < string , any > ) {
83+ if (
84+ changedProperties . has ( 'captchaEnabled' ) ||
85+ changedProperties . has ( 'currentUser' ) ||
86+ changedProperties . has ( 'allowAnonymousComments' )
87+ ) {
88+ if ( this . showCaptcha ) {
89+ this . handleFetchCaptcha ( ) ;
90+ }
91+ }
92+ }
93+
8194 async handleFetchCaptcha ( ) {
8295 if ( ! this . showCaptcha ) {
8396 return ;
@@ -143,7 +156,6 @@ export class BaseForm extends LitElement {
143156 override connectedCallback ( ) : void {
144157 super . connectedCallback ( ) ;
145158 this . addEventListener ( 'keydown' , this . onKeydown ) ;
146- this . handleFetchCaptcha ( ) ;
147159 }
148160
149161 override disconnectedCallback ( ) : void {
You can’t perform that action at this time.
0 commit comments