2
0

🔖 Release 2.6.2

This commit is contained in:
Baptiste Arnaud
2022-08-29 09:16:28 +02:00
parent d94879ec3b
commit 194df22ec0
3 changed files with 5 additions and 3 deletions

View File

@ -46,7 +46,9 @@ export const compressFile = async (file: File) => {
: file
}
export const removeUndefinedFields = <T>(obj: T): T =>
export const removeUndefinedFields = <T extends Record<string, unknown>>(
obj: T
): T =>
Object.keys(obj).reduce(
(acc, key) =>
obj[key as keyof T] === undefined