]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix playlist deletion
authorChocobozzz <me@florianbigard.com>
Mon, 17 Aug 2020 13:39:15 +0000 (15:39 +0200)
committerChocobozzz <chocobozzz@cpy.re>
Wed, 19 Aug 2020 09:30:21 +0000 (11:30 +0200)
client/src/app/shared/shared-video-playlist/video-playlist.service.ts

index cc3d04b9e2f30254ddf52ae7a1026e1fc6f896be..5c7eed647d3d59f7c2ecb87f873e54698313a018 100644 (file)
@@ -233,7 +233,11 @@ export class VideoPlaylistService {
                  tap(() => {
                    if (!videoId) return
 
-                   this.videoExistsCache[videoId] = this.videoExistsCache[videoId].filter(e => e.playlistElementId !== playlistElementId)
+                   if (this.videoExistsCache[videoId]) {
+                     this.videoExistsCache[videoId] = this.videoExistsCache[videoId]
+                       .filter(e => e.playlistElementId !== playlistElementId)
+                   }
+
                    this.runPlaylistCheck(videoId)
                  }),
                  catchError(err => this.restExtractor.handleError(err))