]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-editor.js
Updated js dev docs with latest component changes
[bookstack] / resources / js / components / page-editor.js
index 41e070b9dd18635f57c0495ce0d29087ec9e77a4..d6faabd054129d76e7d94bf6c0a69d430c6688d1 100644 (file)
@@ -196,7 +196,8 @@ export class PageEditor extends Component {
         event.preventDefault();
 
         const link = event.target.closest('a').href;
-        const dialog = this.switchDialogContainer.components['confirm-dialog'];
+        /** @var {ConfirmDialog} **/
+        const dialog = window.$components.firstOnElement(this.switchDialogContainer, 'confirm-dialog');
         const [saved, confirmed] = await Promise.all([this.saveDraft(), dialog.show()]);
 
         if (saved && confirmed) {