Skip to content

Commit a5ff1f7

Browse files
committed
fix: google login not working sometimes
1 parent f6d6b0e commit a5ff1f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app-src/scripts/main/global-services/google-api-s.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
login() {
134134
/*jshint camelcase: false */
135135
const EXPIRES_SAFETY_MARGIN = 30000;
136-
const isExpired = (window.moment()
136+
const isExpired = (!this.$rootScope.r.googleTokens.expiresAt || window.moment()
137137
.valueOf() + EXPIRES_SAFETY_MARGIN > this.$rootScope.r.googleTokens.expiresAt);
138138

139139
if (this.$rootScope.r.googleTokens.accessToken && !isExpired) {

0 commit comments

Comments
 (0)