1
0
Fork 0
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:
Chocobozzz 2018-05-16 09:28:18 +02:00
parent 17c49e60b3
commit 2efd32f697
No known key found for this signature in database
GPG key ID: 583A612D890159BE
8 changed files with 62 additions and 40 deletions

View file

@ -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 {