diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-05 10:58:44 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa (patch) | |
tree | c4984e854f5dc18e5c27afd73b843bd52c143034 /shared/utils/requests/requests.ts | |
parent | 07b1a18aa678d260009a93e36606c5c5f585723d (diff) | |
download | PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.gz PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.tar.zst PeerTube-df0b219d36bf6852cdf2a7ad09ed4a41c6bccefa.zip |
Add playlist rest tests
Diffstat (limited to 'shared/utils/requests/requests.ts')
-rw-r--r-- | shared/utils/requests/requests.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shared/utils/requests/requests.ts b/shared/utils/requests/requests.ts index dc2d4abe5..3532fb429 100644 --- a/shared/utils/requests/requests.ts +++ b/shared/utils/requests/requests.ts | |||
@@ -77,6 +77,8 @@ function makeUploadRequest (options: { | |||
77 | Object.keys(options.fields).forEach(field => { | 77 | Object.keys(options.fields).forEach(field => { |
78 | const value = options.fields[field] | 78 | const value = options.fields[field] |
79 | 79 | ||
80 | if (value === undefined) return | ||
81 | |||
80 | if (Array.isArray(value)) { | 82 | if (Array.isArray(value)) { |
81 | for (let i = 0; i < value.length; i++) { | 83 | for (let i = 0; i < value.length; i++) { |
82 | req.field(field + '[' + i + ']', value[i]) | 84 | req.field(field + '[' + i + ']', value[i]) |