feat(ui-toolkit): define next section for empty link

This commit is contained in:
Fábio Moreira 2018-05-09 16:52:14 +01:00 committed by Sérgio Ramos
parent 91e1fb192b
commit bd332423be

View File

@ -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) {