fix: urlencoded formdata key value params ui
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
committed by
Andrew Bastin
parent
1ba89a0f0b
commit
b57b948107
@@ -4,4 +4,6 @@ export const tupleToRecord = <
|
||||
>(
|
||||
tuples: [KeyType, ValueType][]
|
||||
): Record<KeyType, ValueType> =>
|
||||
(Object.assign as any)(...tuples.map(([key, val]) => ({ [key]: val })))
|
||||
tuples.length > 0
|
||||
? (Object.assign as any)(...tuples.map(([key, val]) => ({ [key]: val })))
|
||||
: {}
|
||||
|
||||
Reference in New Issue
Block a user