diff --git a/lib/resources/Files.js b/lib/resources/Files.js index b400d002fe..58d81b1219 100644 --- a/lib/resources/Files.js +++ b/lib/resources/Files.js @@ -8,9 +8,7 @@ const multipartDataGenerator = require('../MultipartDataGenerator'); const Error = require('../Error'); module.exports = StripeResource.extend({ - requestDataProcessor(method, data, headers, callback) { - data = data || {}; - + requestDataProcessor(method, data = {}, headers, callback) { if (method === 'POST') { return getProcessorForSourceType(data); } else { diff --git a/lib/resources/OAuth.js b/lib/resources/OAuth.js index 70ce4a2358..3e18ff2e17 100644 --- a/lib/resources/OAuth.js +++ b/lib/resources/OAuth.js @@ -9,10 +9,7 @@ const oAuthHost = 'connect.stripe.com'; module.exports = StripeResource.extend({ basePath: '/', - authorizeUrl(params, options) { - params = params || {}; - options = options || {}; - + authorizeUrl(params = {}, options = {}) { let path = 'oauth/authorize'; // For Express accounts, the path changes diff --git a/test/Webhook.spec.js b/test/Webhook.spec.js index 23344013c0..79576b4c6b 100644 --- a/test/Webhook.spec.js +++ b/test/Webhook.spec.js @@ -205,9 +205,7 @@ describe('Webhooks', () => { }); }); -function generateHeaderString(opts) { - opts = opts || {}; - +function generateHeaderString(opts = {}) { opts.timestamp = Math.floor(opts.timestamp) || Math.floor(Date.now() / 1000); opts.payload = opts.payload || EVENT_PAYLOAD_STRING; opts.secret = opts.secret || SECRET;