diff --git a/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts b/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts index 71dc344..3e831a7 100644 --- a/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts +++ b/projects/ngx-turnstile/src/lib/ngx-turnstile.component.ts @@ -67,7 +67,7 @@ export class NgxTurnstileComponent implements AfterViewInit, OnDestroy { throw 'Version not defined in ngx-turnstile component.'; } - public ngAfterViewInit(): void { + public afterNextRender(): void { let turnstileOptions: TurnstileOptions = { sitekey: this.siteKey, theme: this.theme,