aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-03-19 16:33:40 +0100
committerChocobozzz <me@florianbigard.com>2019-03-19 16:33:40 +0100
commitd85798c4e7b18f3b464fa819ffc5bec06137e3e9 (patch)
tree56fe546d0d237676c3f9b462bba12156e5d82225 /server/initializers/constants.ts
parent2ba92871319d7af63472c1380664a9f9eeb1c690 (diff)
downloadPeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.tar.gz
PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.tar.zst
PeerTube-d85798c4e7b18f3b464fa819ffc5bec06137e3e9.zip
Better videos redundancy config error handling
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 7a3ec3874..54cd57619 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -881,6 +881,8 @@ function buildVideosExtname () {
881function buildVideosRedundancy (objs: any[]): VideosRedundancy[] { 881function buildVideosRedundancy (objs: any[]): VideosRedundancy[] {
882 if (!objs) return [] 882 if (!objs) return []
883 883
884 if (!Array.isArray(objs)) return objs
885
884 return objs.map(obj => { 886 return objs.map(obj => {
885 return Object.assign({}, obj, { 887 return Object.assign({}, obj, {
886 minLifetime: parseDuration(obj.min_lifetime), 888 minLifetime: parseDuration(obj.min_lifetime),