Fix typo during last post detection in PreviousNext
We're at the last post when (length-1) > i, not length > i, because we're indexing from 0 but starting from 1
This commit is contained in:
parent
30f9448d72
commit
77526a77f1
2 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ export default {
|
|||
if (i > 0) {
|
||||
this.PreviousNexts.push(allBlogs[i - 1].node);
|
||||
}
|
||||
if (allBlogs.length > i) {
|
||||
if (allBlogs.length -1 > i) {
|
||||
this.PreviousNexts.push(allBlogs[i + 1].node);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue