Skip to content

Commit

Permalink
Merge pull request #62 from ONSdigital/fix-for-end-of-section
Browse files Browse the repository at this point in the history
fix for end of section
  • Loading branch information
zimboflyman authored Dec 1, 2021
2 parents 3a5159e + fee0afe commit f54ce24
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,18 @@ const getLogicalDestination = (pageId, { logical }, ctx) => {
? "summary-group"
: "confirmation-group",
};
} else if (logical === "NextPage") {
}

if (logical === "NextPage") {
return getNextPageDestination(pageId, ctx);
} else {
throw new Error(`${logical} is not a valid destination type`);
}

if (logical === "EndOfCurrentSection") {
return { section: "End"}
}

throw new Error(`${logical} is not a valid destination type`);

};

const translateRoutingDestination = (destination, pageId, ctx) => {
Expand Down

0 comments on commit f54ce24

Please sign in to comment.