mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
More robust short to complete uuid error handler
This commit is contained in:
parent
7a07da01c4
commit
ded68a9760
1 changed files with 7 additions and 1 deletions
|
@ -103,7 +103,13 @@ function checkMimetypeRegex (fileMimeType: string, mimeTypeRegex: string) {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
function toCompleteUUID (value: string) {
|
||||
if (isShortUUID(value)) return shortToUUID(value)
|
||||
if (isShortUUID(value)) {
|
||||
try {
|
||||
return shortToUUID(value)
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
return value
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue