Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 60e8f1d

Browse files
committed
is null check on google drive
1 parent edba3c1 commit 60e8f1d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/common/integrations/GoogleDrive.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ class GoogleDriveUtil {
5858
.then(
5959
() => {
6060
this.auth = gapi.auth2.getAuthInstance();
61-
console.log(this.auth);
62-
console.log(this.auth.isSignedIn);
63-
this.auth.isSignedIn.listen(isLoggedIn => this.updateLoginStatus(isLoggedIn));
64-
this.updateLoginStatus(this.auth.isSignedIn.get());
65-
globalObserver.emit('googledrive.initialized', true);
61+
if (this.auth.isSignedIn != null){
62+
this.auth.isSignedIn.listen(isLoggedIn => this.updateLoginStatus(isLoggedIn));
63+
this.updateLoginStatus(this.auth.isSignedIn.get());
64+
globalObserver.emit('googledrive.initialized', true);
6665

67-
$('#integrations').removeClass('invisible');
68-
$('#save-google-drive')
69-
.parent()
70-
.removeClass('invisible');
71-
$('#load-google-drive')
72-
.parent()
73-
.removeClass('invisible');
66+
$('#integrations').removeClass('invisible');
67+
$('#save-google-drive')
68+
.parent()
69+
.removeClass('invisible');
70+
$('#load-google-drive')
71+
.parent()
72+
.removeClass('invisible');
73+
}
7474
},
7575
error => errLogger(error, translate('There was an error initialising Google Drive.'))
7676
);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy