Skip to content

Commit

Permalink
Fix "reading 'isBlacklisted' of undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed May 29, 2024
1 parent 4ea659d commit e2c3548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/core/middlewares/validators/redundancy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ const videoPlaylistRedundancyGetValidator = [
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
if (areValidationErrors(req, res)) return
if (!await doesVideoExist(req.params.videoId, res)) return
if (!canVideoBeFederated(res.locals.onlyVideo)) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)

const video = res.locals.videoAll
if (!canVideoBeFederated(video)) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)

const paramPlaylistType = req.params.streamingPlaylistType as unknown as number // We casted to int above
const videoStreamingPlaylist = video.VideoStreamingPlaylists.find(p => p.type === paramPlaylistType)
Expand Down

0 comments on commit e2c3548

Please sign in to comment.