X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/25c23a2e5f3934a2ed2cc51ef9de0b286986fadf..refs/pull/3918/head:/resources/js/components/image-manager.js diff --git a/resources/js/components/image-manager.js b/resources/js/components/image-manager.js index a78aa3483..a44fffc1b 100644 --- a/resources/js/components/image-manager.js +++ b/resources/js/components/image-manager.js @@ -94,7 +94,7 @@ export class ImageManager extends Component { this.callback = callback; this.type = type; - this.popupEl.components.popup.show(); + this.getPopup().show(); this.dropzoneContainer.classList.toggle('hidden', type !== 'gallery'); if (!this.hasData) { @@ -104,7 +104,14 @@ export class ImageManager extends Component { } hide() { - this.popupEl.components.popup.hide(); + this.getPopup().hide(); + } + + /** + * @returns {Popup} + */ + getPopup() { + return window.$components.firstOnElement(this.popupEl, 'popup'); } async loadGallery() {