From 7d3f8bbec9873f83c9767d2832a394b647ffba05 Mon Sep 17 00:00:00 2001 From: Afzal Sayed Date: Fri, 13 Nov 2020 14:22:52 +0530 Subject: [PATCH 1/2] update isRootCatchAllRedirect condition --- lib/helpers/isRootCatchAllRedirect.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/helpers/isRootCatchAllRedirect.js b/lib/helpers/isRootCatchAllRedirect.js index 8363f69..8170ed1 100644 --- a/lib/helpers/isRootCatchAllRedirect.js +++ b/lib/helpers/isRootCatchAllRedirect.js @@ -1,5 +1,7 @@ // Return true if the redirect is a root level catch-all -// (e.g., /[[...slug]]) -const isRootCatchAllRedirect = (redirect) => redirect.startsWith("/*"); +// (e.g., /[[...slug]] or /[...slug]) +const isRootCatchAllRedirect = (redirect) => + redirect.startsWith("/*") || + (redirect.startsWith("/:") && redirect.endsWith("/*")); module.exports = isRootCatchAllRedirect; From f0738dac55bcc9326a474c738e317cbf175ef949 Mon Sep 17 00:00:00 2001 From: Afzal Sayed Date: Fri, 13 Nov 2020 14:32:57 +0530 Subject: [PATCH 2/2] update isRootCatchAllRedirect condition --- lib/helpers/isRootCatchAllRedirect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers/isRootCatchAllRedirect.js b/lib/helpers/isRootCatchAllRedirect.js index 8170ed1..18bef47 100644 --- a/lib/helpers/isRootCatchAllRedirect.js +++ b/lib/helpers/isRootCatchAllRedirect.js @@ -2,6 +2,6 @@ // (e.g., /[[...slug]] or /[...slug]) const isRootCatchAllRedirect = (redirect) => redirect.startsWith("/*") || - (redirect.startsWith("/:") && redirect.endsWith("/*")); + (redirect.startsWith("/:") && redirect.includes("/*")); module.exports = isRootCatchAllRedirect;