👷 refactor(removeNullishValues): allow empty strings configured in parameters (#4291)

This commit is contained in:
Danny Avila 2024-09-30 18:15:16 -04:00 committed by GitHub
parent ad74350036
commit 2ce8647540
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -830,7 +830,7 @@ export function removeNullishValues<T extends Record<string, unknown>>(obj: T):
(Object.keys(newObj) as Array<keyof T>).forEach((key) => {
const value = newObj[key];
if (value === undefined || value === null || value === '') {
if (value === undefined || value === null) {
delete newObj[key];
}
});