mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-26 23:47:25 +00:00
Add optional chaining for sponsor segments.
This commit is contained in:
parent
43fa5d8db8
commit
6371973943
@ -559,7 +559,7 @@ export default {
|
||||
updateMarkers() {
|
||||
const markers = this.$refs.container.querySelector(".shaka-ad-markers");
|
||||
const array = ["to right"];
|
||||
this.sponsors?.segments.forEach(segment => {
|
||||
this.sponsors?.segments?.forEach(segment => {
|
||||
const start = (segment.segment[0] / this.video.duration) * 100;
|
||||
const end = (segment.segment[1] / this.video.duration) * 100;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user