allow no params

This commit is contained in:
Dan Zajdband
2012-06-21 11:15:05 -03:00
parent ce73499bc6
commit 06f1a3162e

View File

@@ -23,6 +23,11 @@ Object.keys(methods).forEach(function(method){
var that = this;
if("function" == typeof params) {
fn = params;
params = {};
}
if(!this.token || Date.now() > +new Date(this.token.expires_at)) {
this.requestToken(function(){
@@ -46,6 +51,11 @@ Object.keys(methods).forEach(function(method){
var that = this;
if("function" == typeof params) {
fn = params;
params = {};
}
if(!this.token || Date.now() > +new Date(this.token.expires_at)) {
this.requestToken(function(){