Exclude "index" in PageRoute name.

This commit is contained in:
Dillon Kearns 2019-08-20 23:23:39 -07:00
parent aa74bb5003
commit 1b69602e84

View File

@ -59,7 +59,10 @@ function generate(scanned) {
// const elmType = pathFragments.map(toPascalCase).join("");
const elmType =
"(PageRoute [ " +
pathFragments.map(fragment => `"${fragment}"`).join(", ") +
pathFragments
.filter(fragment => fragment !== "index")
.map(fragment => `"${fragment}"`)
.join(", ") +
" ])";
if (!is404) {
captureRouteRecord(pathFragments, elmType, routeRecord);