diff options
author | Chocobozzz <me@florianbigard.com> | 2020-09-25 16:19:35 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-11-09 15:33:04 +0100 |
commit | fb7194043d0486ce0a6a40b2ffbdf32878c33a6f (patch) | |
tree | 6ed304a5d730a75da0a4460b3009df88684fa598 /server/helpers/core-utils.ts | |
parent | a5cf76afa378aae81af2a9b0ce548e5d2582f832 (diff) | |
download | PeerTube-fb7194043d0486ce0a6a40b2ffbdf32878c33a6f.tar.gz PeerTube-fb7194043d0486ce0a6a40b2ffbdf32878c33a6f.tar.zst PeerTube-fb7194043d0486ce0a6a40b2ffbdf32878c33a6f.zip |
Check live duration and size
Diffstat (limited to 'server/helpers/core-utils.ts')
-rw-r--r-- | server/helpers/core-utils.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index 49eee7c59..e1c15a6eb 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -41,6 +41,7 @@ const timeTable = { | |||
41 | } | 41 | } |
42 | 42 | ||
43 | export function parseDurationToMs (duration: number | string): number { | 43 | export function parseDurationToMs (duration: number | string): number { |
44 | if (duration === null) return null | ||
44 | if (typeof duration === 'number') return duration | 45 | if (typeof duration === 'number') return duration |
45 | 46 | ||
46 | if (typeof duration === 'string') { | 47 | if (typeof duration === 'string') { |