From d486bfd948271c0e5cde8f155f0c9522dbe5f0ed Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Thu, 29 Jul 2021 23:00:40 +0800 Subject: [PATCH] fix bug --- layout/_partial/main/article/read_next.ejs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout/_partial/main/article/read_next.ejs b/layout/_partial/main/article/read_next.ejs index 0855438..26d66e7 100644 --- a/layout/_partial/main/article/read_next.ejs +++ b/layout/_partial/main/article/read_next.ejs @@ -12,12 +12,13 @@ function layoutDiv() { } else if (page.layout === 'wiki' && page.wiki && page.wiki.length > 0) { let proj = theme.wiki.projects[page.wiki]; if (proj) { + const current = page.order || 0; proj.pages.forEach((p, i) => { - if (p.order < page.order) { + if (p.order < current) { if (prev == undefined || p.order > prev.order) { prev = p; } - } else if (p.order > page.order) { + } else if (p.order > current) { if (next == undefined || p.order < next.order) { next = p; }