Skip to content

Commit

Permalink
fix: Check for undefined instead of falsy when cleaning request body
Browse files Browse the repository at this point in the history
  • Loading branch information
Alorel committed Oct 25, 2019
1 parent f1b4b84 commit d7acf51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngx-sails/src/lib/SailsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function lowerCaseHeaders(headers?: AnyObject<any>): AnyObject<any> {
function clean<T extends AnyObject<any>>(obj?: T): T {
if (obj) {
for (const key of Object.keys(obj)) {
!obj[key] && delete obj[key];
obj[key] === undefined && delete obj[key];
}
}

Expand Down

0 comments on commit d7acf51

Please sign in to comment.