Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Convert duration to a number before processing (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderevers authored and blakeembrey committed Oct 19, 2016
1 parent 1167a26 commit 1fe92d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client-oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function ClientOAuth2Token (client, data) {
ClientOAuth2Token.prototype.expiresIn = function (duration) {
if (!isNaN(duration)) {
this.expires = new Date()
this.expires.setSeconds(this.expires.getSeconds() + duration)
this.expires.setSeconds(this.expires.getSeconds() + Number(duration))
} else {
this.expires = undefined
}
Expand Down

0 comments on commit 1fe92d7

Please sign in to comment.