We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec02fc8 commit 7cf31a8Copy full SHA for 7cf31a8
src/utils/removeUndefinedObjectKeys.ts
@@ -1,6 +1,6 @@
1
export function removeUndefinedObjectKeys(obj: { [key: string]: any }) {
2
Object.keys(obj).forEach((key) =>
3
- obj[key] === undefined ? delete obj[key] : {}
+ obj[key] === undefined && delete obj[key]
4
);
5
return obj;
6
}
0 commit comments