Skip to content

Commit

Permalink
fix: removing nested nulls from options passed to api, closes #581
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudinary-pkoniu committed Mar 1, 2023
1 parent 990b95a commit 315a8e3
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib-es5/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,18 +1602,6 @@ function hashToQuery(hash) {
*/

function present(value) {
// if (typeof value === 'string' || Array.isArray(value)) {
// return value.length > 0;
// } else if (typeof value === 'number') {
// return value > 0;
// } else if (typeof value === 'object') {
// return true;
// } else if (typeof value === 'boolean') {
// return value;
// }
if (Array.isArray(value)) {
return true;
}
return value != null && ("" + value).length > 0;
}

Expand Down

0 comments on commit 315a8e3

Please sign in to comment.