Skip to content

Commit

Permalink
fix: fix the error caused by closing lazy loading of images (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed Aug 19, 2024
1 parent 61746db commit 5dede08
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions source/js/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global KEEP */

window.addEventListener('DOMContentLoaded', () => {
const { version, local_search } = KEEP.theme_config
const { version, local_search, lazyload } = KEEP.theme_config

KEEP.themeInfo = {
theme: `Keep v${version}`,
Expand Down Expand Up @@ -69,7 +69,10 @@ window.addEventListener('DOMContentLoaded', () => {
KEEP.initBack2Top()
KEEP.initCodeBlock()
KEEP.setFooterVersion()
KEEP.initLazyLoad()

if (lazyload?.enable === true) {
KEEP.initLazyLoad()
}

if (local_search?.enable === true) {
KEEP.initLocalSearch()
Expand Down

0 comments on commit 5dede08

Please sign in to comment.