Skip to content

Commit a78bac1

Browse files
author
Kelly Churchill
committed
missed file
1 parent 2c8bebf commit a78bac1

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/components/NextPrevious/NextPrevious.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,10 @@ export default class NextPrevious extends React.Component {
203203
if (prevPagePath === undefined) {
204204
let prevSection = sectionArray[parseInt(currentSectionIndex) - 1];
205205
let prevSectionObject = navigation[prevSection];
206-
if (GATSBY_ENV !== 'internal') {
207-
while (prevSection && prevSectionObject.internal === true) {
208-
currentSectionIndex--;
209-
prevSection = sectionArray[parseInt(currentSectionIndex) - 1];
210-
prevSectionObject = navigation[prevSection];
211-
}
206+
while (prevSection) {
207+
currentSectionIndex--;
208+
prevSection = sectionArray[parseInt(currentSectionIndex) - 1];
209+
prevSectionObject = navigation[prevSection];
212210
}
213211
if (prevSection) {
214212
prevPagePath = `${prevSection}`;
@@ -227,13 +225,12 @@ export default class NextPrevious extends React.Component {
227225
if (nextPagePath === undefined) {
228226
let nextSection = sectionArray[parseInt(currentSectionIndex) + 1];
229227
let nextSectionObject = navigation[nextSection];
230-
if (GATSBY_ENV !== 'internal') {
231-
while (nextSection && nextSectionObject.internal === true) {
232-
currentSectionIndex++;
233-
nextSection = sectionArray[parseInt(currentSectionIndex) + 1];
234-
nextSectionObject = navigation[nextSection];
235-
}
228+
while (nextSection) {
229+
currentSectionIndex++;
230+
nextSection = sectionArray[parseInt(currentSectionIndex) + 1];
231+
nextSectionObject = navigation[nextSection];
236232
}
233+
237234
if (nextSection) {
238235
nextPagePath = `${nextSection}`;
239236
const nextHasSubnav = typeof nextSectionObject['sub-nav'] === 'object';

0 commit comments

Comments
 (0)