From bd332423beb3af86e7453478f481f4fb7206d43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Moreira?= Date: Wed, 9 May 2018 16:52:14 +0100 Subject: [PATCH] feat(ui-toolkit): define next section for empty link --- packages/ui-toolkit/src/styleguide/bottomNav.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui-toolkit/src/styleguide/bottomNav.js b/packages/ui-toolkit/src/styleguide/bottomNav.js index 5d98c6d4..1133d335 100644 --- a/packages/ui-toolkit/src/styleguide/bottomNav.js +++ b/packages/ui-toolkit/src/styleguide/bottomNav.js @@ -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) {