Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

fix: make sure state is set

Christian Fei0c1bb7711709
diff --git a/client/components/video-element.js b/client/components/video-element.js
index fb4d3d5..f41c93e 100644
--- a/client/components/video-element.js
+++ b/client/components/video-element.js
@@ -83,11 +83,11 @@ class VideoElement extends HTMLElement {
`
- if (window.state && window.state.downloading[this.video.id]) {
+ if (window.state && window.state.downloading && window.state.downloading[this.video.id]) {
this.dataset['downloading'] = 'true'
this.querySelector('.action.download').innerText = this.downloadStartedText
}
- if (window.state && window.state.summarizing[this.video.id]) {
+ if (window.state && window.state.summarizing && window.state.summarizing[this.video.id]) {
this.dataset['summarizing'] = 'true'
this.querySelector('.action.summarize').innerText = this.summaryStartedText
}