[fix] fix bugs

This commit is contained in:
xaoxuu 2024-01-20 14:48:04 +08:00
parent 970c49bd06
commit 5633852267
2 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@
function layoutDiv() {
var el = ''
el += `<nav class="menu dis-select${where == 'main' ? ' mobile-hidden' : ''}">`
for (let item of theme.menubar.items) {
for (let item of (theme.menubar.items || [])) {
if (item == undefined || item.id == null || item.url == null) {
continue
}

View File

@ -21,6 +21,9 @@ function getWikiObject(ctx) {
const data = ctx.locals.get('data')
var list = []
for (let key of Object.keys(data)) {
if (key.endsWith('.DS_Store')) {
continue
}
if (key.includes('wiki/') && key.length > 5) {
let newKey = key.replace('wiki/', '')
let obj = data[key]