Fix js error in pages without sidebar

This commit is contained in:
Giuseppe Criscione 2020-11-30 18:52:26 +01:00
parent 161d6f2c1a
commit 9dcad3b53b
2 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -23,9 +23,11 @@ export default Formwork = {
Pages.init();
Updates.init();
$('.toggle-navigation').addEventListener('click', function () {
$('.sidebar').classList.toggle('show');
});
if ($('.toggle-navigation')) {
$('.toggle-navigation').addEventListener('click', function () {
$('.sidebar').classList.toggle('show');
});
}
$$('[data-chart-data]').forEach(function (element) {
var data = JSON.parse(element.getAttribute('data-chart-data'));