]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/utils.ts
Set last subtitle or subtitle in URL
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / utils.ts
index c872874820b2a316bd677f290655daf1031b3183..8b9f34b994033f628b41245287a22836ca648b35 100644 (file)
@@ -39,6 +39,7 @@ function buildVideoLink (time?: number, url?: string) {
 }
 
 function timeToInt (time: number | string) {
+  if (!time) return 0
   if (typeof time === 'number') return time
 
   const reg = /^((\d+)h)?((\d+)m)?((\d+)s?)?$/