Skip to content

Commit b9585b6

Browse files
committed
add null check
1 parent dd46151 commit b9585b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TokenStorage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class TokenStorage {
5454
const updatedResponseData = Object.assign({}, responseData);
5555
updatedResponseData.expires_at = null;
5656

57-
if (typeof updatedResponseData.expires_in !== 'undefined' && updatedResponseData.expires_in >= 0) {
57+
if (typeof updatedResponseData.expires_in !== 'undefined' && updatedResponseData.expires_in !== null && updatedResponseData.expires_in >= 0) {
5858
updatedResponseData.expires_at = Math.round(callTimestamp / 1000) + updatedResponseData.expires_in;
5959
}
6060

0 commit comments

Comments
 (0)