You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an unexpected behavior with omitDeep, which I think is inherited throughout other parts of the lib as well.
If omitDeep is given an empty array, it changes the array to null, which it should have left as an empty array. See code examples below.
leta=[{aa: 'aaa',bb: {cc: 'ccc'}}]_.omitDeep(a,'cc')// ==> [ { aa: 'aaa', bb: {}} ] ✅_.omitDeep([[]],'cc')// ==> [ [] ] ✅_.omitDeep([],'cc')// ==> null ❌ <---- it was supposed to return [] like empty object below_.omitDeep([{}],'cc')// ==> [ {} ] ✅_.omitDeep({},'cc')// ==> {} ✅ <--- empty object example
The text was updated successfully, but these errors were encountered:
There is an unexpected behavior with omitDeep, which I think is inherited throughout other parts of the lib as well.
If
omitDeep
is given an empty array, it changes the array to null, which it should have left as an empty array. See code examples below.The text was updated successfully, but these errors were encountered: