]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/page-display.js
Started refactor and alignment of component system
[bookstack] / resources / js / components / page-display.js
index b4f1cca4fbc5682fc124d0342ee3189c198a0c3a..f8377130c1f8615958c2eaf2ad34eca07f15c17f 100644 (file)
@@ -22,7 +22,7 @@ class PageDisplay {
         if (sidebarPageNav) {
             DOM.onChildEvent(sidebarPageNav, 'a', 'click', (event, child) => {
                 event.preventDefault();
-                window.components['tri-layout'][0].showContent();
+                window.$components.first('tri-layout').showContent();
                 const contentId = child.getAttribute('href').substr(1);
                 this.goToText(contentId);
                 window.history.pushState(null, null, '#' + contentId);