Don't include menu.js if no main menu items

This commit is contained in:
vimux 2018-11-28 13:21:23 -05:00
parent 1f600c2781
commit 45f0ca00f7
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,9 @@
{{ end }} {{ end }}
</div> </div>
{{ partial "footer" . }} {{ partial "footer" . }}
{{- with .Site.Menus.main }}
<script src="{{ "js/menu.js" | relURL }}"></script> <script src="{{ "js/menu.js" | relURL }}"></script>
{{- end }}
{{- partial "mathjax.html" . -}} {{- partial "mathjax.html" . -}}
</body> </body>
</html> </html>

View file

@ -10,6 +10,4 @@ function toggleMenu() {
); );
} }
if (toggle && menu) {
toggle.addEventListener('click', toggleMenu, false); toggle.addEventListener('click', toggleMenu, false);
}