mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-17 07:28:23 +00:00
Fix docs sidebar after history restore
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
(() => {
|
||||
const initSidebar = (sidebarComponent) => {
|
||||
if (sidebarComponent.dataset.sidebarInitialized) return;
|
||||
if (sidebarComponent.dataset.sidebarInitialized && typeof sidebarComponent.toggle === 'function') return;
|
||||
|
||||
const initialOpen = sidebarComponent.dataset.initialOpen !== 'false';
|
||||
const initialMobileOpen = sidebarComponent.dataset.initialMobileOpen === 'true';
|
||||
@@ -60,6 +60,6 @@
|
||||
};
|
||||
|
||||
if (window.basecoat) {
|
||||
window.basecoat.register('sidebar', '.sidebar:not([data-sidebar-initialized])', initSidebar);
|
||||
window.basecoat.register('sidebar', '.sidebar', initSidebar);
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user