Skip to content

Commit

Permalink
lebab transform: arg-spread
Browse files Browse the repository at this point in the history
  • Loading branch information
rattrayalex-stripe committed May 4, 2019
1 parent 7daa6da commit c1934de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Error.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = _Error;
* Generic Error klass to wrap any errors returned by stripe-node
*/
function _Error(raw) {
this.populate.apply(this, arguments);
this.populate(...arguments);
this.stack = new Error(this.message).stack;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/StripeResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function StripeResource(stripe, urlData) {
}, this);
}

this.initialize.apply(this, arguments);
this.initialize(...arguments);
}

StripeResource.prototype = {
Expand Down
8 changes: 4 additions & 4 deletions lib/resources/Customers.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ module.exports = StripeResource.extend({

updateSubscription: function(customerId, subscriptionId) {
if (typeof subscriptionId == 'string') {
return this._newstyleUpdateSubscription.apply(this, arguments);
return this._newstyleUpdateSubscription(...arguments);
} else {
return this._legacyUpdateSubscription.apply(this, arguments);
return this._legacyUpdateSubscription(...arguments);
}
},

cancelSubscription: function(customerId, subscriptionId) {
// This is a hack, but it lets us maximize our overloading.
// Precarious assumption: If it's not an auth key it _could_ be a sub id:
if (typeof subscriptionId == 'string' && !utils.isAuthKey(subscriptionId)) {
return this._newstyleCancelSubscription.apply(this, arguments);
return this._newstyleCancelSubscription(...arguments);
} else {
return this._legacyCancelSubscription.apply(this, arguments);
return this._legacyCancelSubscription(...arguments);
}
},

Expand Down

0 comments on commit c1934de

Please sign in to comment.