Skip to content

Commit

Permalink
Merge pull request #149 from gregory/fix_145
Browse files Browse the repository at this point in the history
make sure google_auth is not empty
  • Loading branch information
theoephraim authored May 26, 2017
2 parents f717d85 + b34032d commit 4536f52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ var GoogleSpreadsheet = function( ss_key, auth_id, options ){
auth: function(step) {
if (auth_mode != 'jwt') return step();
// check if jwt token is expired
if (google_auth.expires > +new Date()) return step();
if (google_auth && google_auth.expires > +new Date()) return step();
renewJwtAuth(step);
},
request: function(result, step) {
Expand Down

0 comments on commit 4536f52

Please sign in to comment.