FIX Double call to functionn nulling the functionnalities of index panel on mobile
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
621e433ad4
commit
57abce6c70
|
|
@ -11,10 +11,10 @@ export default function handleIndexPanel(): void {
|
|||
observeFootnotesLinks();
|
||||
// INDEX PANEL MOBILE
|
||||
handleMobileOpenToggle();
|
||||
|
||||
// CHAPITRES
|
||||
observeSommaireLinks();
|
||||
handleChapterProgression();
|
||||
handleMobileOpenToggle();
|
||||
}
|
||||
|
||||
function handleMobileOpenToggle(): void {
|
||||
|
|
@ -26,6 +26,7 @@ function handleMobileOpenToggle(): void {
|
|||
mobileOpenToggle.addEventListener('click', () => {
|
||||
const isMobileOpen = indexPanel.getAttribute('data-mobile-open');
|
||||
|
||||
console.log(isMobileOpen);
|
||||
if (isMobileOpen === 'true') {
|
||||
indexPanel.setAttribute('data-mobile-open', 'false');
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user