mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-02 22:45:55 +03:00
Exclude "index" in PageRoute name.
This commit is contained in:
parent
aa74bb5003
commit
1b69602e84
@ -59,7 +59,10 @@ function generate(scanned) {
|
|||||||
// const elmType = pathFragments.map(toPascalCase).join("");
|
// const elmType = pathFragments.map(toPascalCase).join("");
|
||||||
const elmType =
|
const elmType =
|
||||||
"(PageRoute [ " +
|
"(PageRoute [ " +
|
||||||
pathFragments.map(fragment => `"${fragment}"`).join(", ") +
|
pathFragments
|
||||||
|
.filter(fragment => fragment !== "index")
|
||||||
|
.map(fragment => `"${fragment}"`)
|
||||||
|
.join(", ") +
|
||||||
" ])";
|
" ])";
|
||||||
if (!is404) {
|
if (!is404) {
|
||||||
captureRouteRecord(pathFragments, elmType, routeRecord);
|
captureRouteRecord(pathFragments, elmType, routeRecord);
|
||||||
|
Loading…
Reference in New Issue
Block a user