🔖 Release 2.6.2
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { StackProps, HStack, Button, IconButton } from '@chakra-ui/react'
|
||||
import { StackProps, HStack, IconButton } from '@chakra-ui/react'
|
||||
import {
|
||||
MARK_BOLD,
|
||||
MARK_ITALIC,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user