style: Update null check for nextPage variable
This commit is contained in:
parent
668f730692
commit
0e59a8b2e0
@ -70,7 +70,7 @@ export function PrevNextLinks() {
|
|||||||
|
|
||||||
// In case the next page is the same as the current page (in subitems),
|
// In case the next page is the same as the current page (in subitems),
|
||||||
// we need to skip it to get the correct next page.
|
// we need to skip it to get the correct next page.
|
||||||
if (nextPage.href === urlPathname) {
|
if (nextPage?.href === urlPathname) {
|
||||||
nextPage = allLinks[linkIndex + 2] || null;
|
nextPage = allLinks[linkIndex + 2] || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user