Skip to content

Commit b1a9dcf

Browse files
committed
Tag check before initialization for web
If tag is not present it won't load gapi either.
1 parent b1062f1 commit b1a9dcf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/web.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ export class GoogleAuthWeb extends WebPlugin implements GoogleAuthPlugin {
1010
platforms: ['web']
1111
});
1212

13-
this.initialize();
13+
if (this.webConfigured)
14+
this.initialize();
15+
}
16+
17+
get webConfigured(): boolean {
18+
return document.getElementsByName('google-signin-client_id').length > 0;
1419
}
1520

1621
initialize() {

0 commit comments

Comments
 (0)