Merge pull request #24 from git710/master_fix

fix: report an error when 'side_tools' config is false
This commit is contained in:
指间的诗意 2020-11-08 20:27:27 +08:00 committed by GitHub
commit 4ab5189cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,4 @@
@require 'common/variables.styl'
@require "./common/magic-theme.styl";
.archive-container {

View File

@ -1,3 +1,4 @@
@require 'common/variables.styl'
@require "./common/magic-theme.styl";
.category-list-container {

View File

@ -56,7 +56,7 @@ window.addEventListener('DOMContentLoaded', () => {
},
initModeToggleButton() {
this.modeToggleButton_dom.addEventListener('click', () => {
this.modeToggleButton_dom && this.modeToggleButton_dom.addEventListener('click', () => {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
this.setItemUtil('light-mode', 'dark');
} else {

View File

@ -72,7 +72,7 @@ ILS.utils = {
this.toolsMenuButton_dom = document.querySelector('.tools-button');
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;
const toolsMenuButtonIcon = this.toolsMenuButton_dom.querySelector('i');