Skip to content

Commit

Permalink
Merge pull request #7108 from yigitfindikli/rpctha
Browse files Browse the repository at this point in the history
fixed #5881 Error loading captcha with angular 6
  • Loading branch information
cagataycivici authored Jan 23, 2019
2 parents fdb1a9a + 21a7dde commit 6efdab1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/components/captcha/captcha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ export class Captcha implements AfterViewInit {

ngAfterViewInit() {
if((<any>window).grecaptcha) {
this.init();
if (!(<any>window).grecaptcha.render){
setTimeout(() =>{
this.init();
},100)
}
else{
this.init();
}
}
else {
(<any>window)[this.initCallback] = () => {
Expand Down

0 comments on commit 6efdab1

Please sign in to comment.