Skip to content

Commit

Permalink
Merge pull request #44 from zousandian/fix-Class-invoke
Browse files Browse the repository at this point in the history
fix: Class should be invoked with 'new'
  • Loading branch information
JacksonTian committed Apr 10, 2017
2 parents 2cb232a + 11993fc commit e15dbf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/api_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class API {
// 调用用户传入的获取token的异步方法,获得token之后使用(并缓存它)。
var token = await this.getToken();
var accessToken;
if (token && (accessToken = AccessToken(token.accessToken, token.expireTime)).isValid()) {
if (token && (accessToken = new AccessToken(token.accessToken, token.expireTime)).isValid()) {
return accessToken;
}
return this.getAccessToken();
Expand Down

0 comments on commit e15dbf4

Please sign in to comment.