fix: toc not visible when switching from mobile to desktop mode (#2139)
This commit is contained in:
parent
c174f62f26
commit
32051dad03
2 changed files with 4 additions and 6 deletions
|
@ -27,6 +27,9 @@ function init() {
|
||||||
mobile.init();
|
mobile.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const $tocWrapper = document.getElementById('toc-wrapper');
|
||||||
|
$tocWrapper.classList.remove('invisible');
|
||||||
|
|
||||||
desktopMode.onchange = refresh;
|
desktopMode.onchange = refresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,11 +15,6 @@ export class TocDesktop {
|
||||||
}
|
}
|
||||||
|
|
||||||
static init() {
|
static init() {
|
||||||
const $tocWrapper = document.getElementById('toc-wrapper');
|
tocbot.init(this.options);
|
||||||
|
|
||||||
if ($tocWrapper) {
|
|
||||||
tocbot.init(this.options);
|
|
||||||
$tocWrapper.classList.remove('invisible');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue