diff --git a/app/assets/javascripts/discourse/app/components/d-lightbox.js b/app/assets/javascripts/discourse/app/components/d-lightbox.js index a35d034138f..6affacbbd75 100644 --- a/app/assets/javascripts/discourse/app/components/d-lightbox.js +++ b/app/assets/javascripts/discourse/app/components/d-lightbox.js @@ -249,7 +249,9 @@ export default class DLightbox extends Component { #onAfterItemChange() { this.isLoading = false; - setSiteThemeColor(this.currentItem.dominantColor); + if (this.currentItem.dominantColor) { + setSiteThemeColor(this.currentItem.dominantColor); + } setCarouselScrollPosition({ behavior: "smooth",