aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-09 11:25:41 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-09 11:25:41 +0200
commit2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713 (patch)
tree72c73ac16e57a88c1592c4098855ccae8364813b /client/src/app/videos/video-watch
parent14d3270f363245d2c83fcc2ac109e39743b5627e (diff)
downloadPeerTube-2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713.tar.gz
PeerTube-2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713.tar.zst
PeerTube-2ed6a0aedc2d2f6b1ac2fd9a1ac137772831f713.zip
Fix exception when getting 404 in video watch
Diffstat (limited to 'client/src/app/videos/video-watch')
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts
index dbe391fff..db3e1cdd6 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -66,11 +66,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
66 } 66 }
67 67
68 ngOnDestroy () { 68 ngOnDestroy () {
69 // Remove WebTorrent stuff 69 // Remove player if it exists
70 console.log('Removing video from webtorrent.') 70 if (this.videoNotFound === false) {
71 71 videojs(this.playerElement).dispose()
72 // Remove player 72 }
73 videojs(this.playerElement).dispose()
74 73
75 // Unsubscribe subscriptions 74 // Unsubscribe subscriptions
76 this.paramsSub.unsubscribe() 75 this.paramsSub.unsubscribe()