mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Fix updating video tags to empty field
This commit is contained in:
parent
17c49e60b3
commit
2efd32f697
8 changed files with 62 additions and 40 deletions
|
@ -66,6 +66,11 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
|
|||
|
||||
if (obj[key] === undefined) continue
|
||||
|
||||
if (Array.isArray(obj[key]) && obj[key].length === 0) {
|
||||
fd.append(key, null)
|
||||
continue
|
||||
}
|
||||
|
||||
if (obj[key] !== null && typeof obj[ key ] === 'object' && !(obj[ key ] instanceof File)) {
|
||||
objectToFormData(obj[ key ], fd, key)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue