From 50a1e91dccb13c2816ab8bf3cb6ae7ae3f35cac6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 17 Aug 2020 15:41:26 +0200 Subject: [PATCH] Fix startAt/stopAt playlist element edition --- .../shared-video-playlist/video-playlist.service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts index 5c7eed647..dc1b56129 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts @@ -215,10 +215,13 @@ export class VideoPlaylistService { map(this.restExtractor.extractDataBool), tap(() => { const existsResult = this.videoExistsCache[videoId] - const elem = existsResult.find(e => e.playlistElementId === playlistElementId) - elem.startTimestamp = body.startTimestamp - elem.stopTimestamp = body.stopTimestamp + if (existsResult) { + const elem = existsResult.find(e => e.playlistElementId === playlistElementId) + + elem.startTimestamp = body.startTimestamp + elem.stopTimestamp = body.stopTimestamp + } this.runPlaylistCheck(videoId) }),