This commit is contained in:
xaoxuu 2021-07-29 23:00:40 +08:00
parent 11cc16a37d
commit d486bfd948
1 changed files with 3 additions and 2 deletions

View File

@ -12,12 +12,13 @@ function layoutDiv() {
} else if (page.layout === 'wiki' && page.wiki && page.wiki.length > 0) { } else if (page.layout === 'wiki' && page.wiki && page.wiki.length > 0) {
let proj = theme.wiki.projects[page.wiki]; let proj = theme.wiki.projects[page.wiki];
if (proj) { if (proj) {
const current = page.order || 0;
proj.pages.forEach((p, i) => { proj.pages.forEach((p, i) => {
if (p.order < page.order) { if (p.order < current) {
if (prev == undefined || p.order > prev.order) { if (prev == undefined || p.order > prev.order) {
prev = p; prev = p;
} }
} else if (p.order > page.order) { } else if (p.order > current) {
if (next == undefined || p.order < next.order) { if (next == undefined || p.order < next.order) {
next = p; next = p;
} }