feat(ui-toolkit): define next section for empty link
This commit is contained in:
parent
91e1fb192b
commit
bd332423be
@ -19,7 +19,8 @@ const previousAndNextSections = data => {
|
||||
const items = data.items;
|
||||
const link = data.link;
|
||||
const sectionNames = items.map(item => item.name);
|
||||
const index = items.findIndex(item => item.name === link);
|
||||
const index =
|
||||
data.link === '/' ? 0 : items.findIndex(item => item.name === link);
|
||||
let ret = { prevSection: null, nextSection: null };
|
||||
|
||||
if (index > -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user