Skip to content

Commit

Permalink
ref(utils): Keep non-enumerable properties in dropUndefinedKeys. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan authored Oct 2, 2024
1 parent 5e6aef2 commit a6348cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/src/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function _dropUndefinedKeys<T>(inputValue: T, memoizationMap: Map<unknown, unkno
// Store the mapping of this value in case we visit it again, in case of circular data
memoizationMap.set(inputValue, returnValue);

for (const key of Object.keys(inputValue)) {
for (const key of Object.getOwnPropertyNames(inputValue)) {
if (typeof inputValue[key] !== 'undefined') {
returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
}
Expand Down

0 comments on commit a6348cc

Please sign in to comment.