Skip to content

A platform for community discussion. Free, open, simple.

FIX: lightbox setup blocked due to waiting for first image load (#22612)

David Battersbyad365fad7a4a
diff --git a/app/assets/javascripts/discourse/app/components/d-lightbox.js b/app/assets/javascripts/discourse/app/components/d-lightbox.js
index 15c7cc0d106..a35d034138f 100644
--- a/app/assets/javascripts/discourse/app/components/d-lightbox.js
+++ b/app/assets/javascripts/discourse/app/components/d-lightbox.js
@@ -192,7 +192,7 @@ export default class DLightbox extends Component {
}
@bind
- async open({ items, startingIndex, callbacks, options }) {
+ open({ items, startingIndex, callbacks, options }) {
this.options = options;
this.items = items;
@@ -202,7 +202,7 @@ export default class DLightbox extends Component {
this.isLoading = true;
this.isVisible = true;
- await this.#setCurrentItem(this.currentIndex);
+ this.#setCurrentItem(this.currentIndex);
if (
this.options.zoomOnOpen &&