aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-05-16 09:28:18 +0200
committerChocobozzz <me@florianbigard.com>2018-05-16 09:42:56 +0200
commit2efd32f697549c59337db5177a93749af8e605d8 (patch)
tree42adaa4bb67b6aa48dcd4fb660616fb37b611573 /client/src/app/shared
parent17c49e60b367868c80f44b9921793dc3a2d9adaa (diff)
downloadPeerTube-2efd32f697549c59337db5177a93749af8e605d8.tar.gz
PeerTube-2efd32f697549c59337db5177a93749af8e605d8.tar.zst
PeerTube-2efd32f697549c59337db5177a93749af8e605d8.zip
Fix updating video tags to empty field
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/misc/utils.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/shared/misc/utils.ts b/client/src/app/shared/misc/utils.ts
index b5bf99be2..b9aa223cf 100644
--- a/client/src/app/shared/misc/utils.ts
+++ b/client/src/app/shared/misc/utils.ts
@@ -66,6 +66,11 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
66 66
67 if (obj[key] === undefined) continue 67 if (obj[key] === undefined) continue
68 68
69 if (Array.isArray(obj[key]) && obj[key].length === 0) {
70 fd.append(key, null)
71 continue
72 }
73
69 if (obj[key] !== null && typeof obj[ key ] === 'object' && !(obj[ key ] instanceof File)) { 74 if (obj[key] !== null && typeof obj[ key ] === 'object' && !(obj[ key ] instanceof File)) {
70 objectToFormData(obj[ key ], fd, key) 75 objectToFormData(obj[ key ], fd, key)
71 } else { 76 } else {