Prevent js exception

This commit is contained in:
Kevin Veen-Birkenbach 2025-03-17 16:41:50 +01:00
parent 4cde1ed9e4
commit e6fa74df61
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
2 changed files with 3 additions and 2 deletions

View File

@ -94,4 +94,5 @@
});
});
}
});
window.initCurrentNav = initCurrentNav;
});

View File

@ -42,7 +42,7 @@
{% if local_md_headings or local_subfolders %}
<div class="local-md-headings">
{% if local_md_headings %}
<div class="current-index" x-data x-init="initCurrentNav()">
<div class="current-index" x-data x-init="typeof initCurrentNav === 'function' && initCurrentNav()">
<p class="caption" role="heading">
<span class="caption-text">Current Index</span>
</p>