X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/63cb6015a8c6db453f5551e50c04bf6ebbc0f3f1..refs/pull/3875/head:/resources/js/components/confirm-dialog.js diff --git a/resources/js/components/confirm-dialog.js b/resources/js/components/confirm-dialog.js index 858be1b85..572945d5a 100644 --- a/resources/js/components/confirm-dialog.js +++ b/resources/js/components/confirm-dialog.js @@ -1,12 +1,12 @@ import {onSelect} from "../services/dom"; +import {Component} from "./component"; /** * Custom equivalent of window.confirm() using our popup component. * Is promise based so can be used like so: * `const result = await dialog.show()` - * @extends {Component} */ -class ConfirmDialog { +export class ConfirmDialog extends Component { setup() { this.container = this.$el; @@ -34,7 +34,7 @@ class ConfirmDialog { * @returns {Popup} */ getPopup() { - return this.container.components.popup; + return window.$components.firstOnElement(this.container, 'popup'); } /** @@ -47,6 +47,4 @@ class ConfirmDialog { } } -} - -export default ConfirmDialog; \ No newline at end of file +} \ No newline at end of file