Skip to content

Commit

Permalink
Refresh token getting new access token when expired.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Chase committed Oct 19, 2016
1 parent 4dd2b51 commit f19985c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const _step = function( auth, liveChatId, pageToken, callback )
}
}

if( response !== undefined && response.items.length > 0)
if( (response && response.items) && response.items.length > 0)
callback( undefined, response );

const pollingInterval = response == undefined ? 10000 : response.pollingIntervalMillis;
Expand Down

0 comments on commit f19985c

Please sign in to comment.