Skip to content

Commit

Permalink
Merge pull request #36 from kndt84/fix-lint-err
Browse files Browse the repository at this point in the history
Fix lint related errors
  • Loading branch information
kndt84 authored Aug 1, 2017
2 parents 859131d + 862cf2b commit 89866f5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/apigClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ import apiGatewayClientFactory from './lib/apiGatewayCore/apiGatewayClient';
const apigClientFactory = {};

const removeEmpty = (obj) => {
Object.keys(obj).forEach(key =>
(obj[key] && typeof obj[key] === 'object') && removeEmpty(obj[key]) || (obj[key] === undefined) && delete obj[key]
Object.keys(obj).forEach((key) =>
(obj[key] && typeof obj[key] === 'object') && removeEmpty(obj[key])
|| (obj[key] === undefined) && delete obj[key]
);
return obj;
};

apigClientFactory.newClient = (config = {}) => {
const apigClient = {};

config = Object.assign({
accessKey: '',
secretKey: '',
Expand All @@ -40,7 +41,7 @@ apigClientFactory.newClient = (config = {}) => {
service: 'execute-api',
defaultContentType: 'application/json',
defaultAcceptType: 'application/json',
systemClockOffset: 0
systemClockOffset: 0,
}, removeEmpty(config));

// extract endpoint and path from url
Expand Down

0 comments on commit 89866f5

Please sign in to comment.