fix: report an error when 'side_tools' config is false
This commit is contained in:
parent
13e1691f90
commit
11c649e97b
|
@ -56,7 +56,7 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||||
},
|
},
|
||||||
|
|
||||||
initModeToggleButton() {
|
initModeToggleButton() {
|
||||||
this.modeToggleButton_dom.addEventListener('click', () => {
|
this.modeToggleButton_dom && this.modeToggleButton_dom.addEventListener('click', () => {
|
||||||
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||||
this.setItemUtil('light-mode', 'dark');
|
this.setItemUtil('light-mode', 'dark');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -72,7 +72,7 @@ ILS.utils = {
|
||||||
this.toolsMenuButton_dom = document.querySelector('.tools-button');
|
this.toolsMenuButton_dom = document.querySelector('.tools-button');
|
||||||
this.toolsWrapperList_dom = document.querySelectorAll('.tools-wrapper li');
|
this.toolsWrapperList_dom = document.querySelectorAll('.tools-wrapper li');
|
||||||
|
|
||||||
this.toolsMenuButton_dom.addEventListener('click', e => {
|
this.toolsMenuButton_dom && this.toolsMenuButton_dom.addEventListener('click', e => {
|
||||||
isOpen = !isOpen;
|
isOpen = !isOpen;
|
||||||
|
|
||||||
const toolsMenuButtonIcon = this.toolsMenuButton_dom.querySelector('i');
|
const toolsMenuButtonIcon = this.toolsMenuButton_dom.querySelector('i');
|
||||||
|
|
Loading…
Reference in New Issue