Don't crash if bar types are missing

This commit is contained in:
Ajay Ramachandran
2021-05-31 14:45:39 -04:00
parent 42fa6c44c4
commit 9478bfe6a4
3 changed files with 4 additions and 4 deletions

View File

@@ -194,7 +194,7 @@ class PreviewBar {
bar.setAttribute('data-vs-segment-type', barSegmentType);
bar.style.backgroundColor = Config.config.barTypes[barSegmentType].color;
bar.style.backgroundColor = Config.config.barTypes[barSegmentType]?.color;
if (!this.onMobileYouTube) bar.style.opacity = Config.config.barTypes[barSegmentType].opacity;
bar.style.position = "absolute";