Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit 1955358

Browse files
authored
Update isRootCatchAllRedirect condition (#77)
* update isRootCatchAllRedirect condition
1 parent a48735f commit 1955358

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/helpers/isRootCatchAllRedirect.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Return true if the redirect is a root level catch-all
2-
// (e.g., /[[...slug]])
3-
const isRootCatchAllRedirect = (redirect) => redirect.startsWith("/*");
2+
// (e.g., /[[...slug]] or /[...slug])
3+
const isRootCatchAllRedirect = (redirect) =>
4+
redirect.startsWith("/*") ||
5+
(redirect.startsWith("/:") && redirect.includes("/*"));
46

57
module.exports = isRootCatchAllRedirect;

0 commit comments

Comments
 (0)