From d977b3f7d542ba39e3bc4b9c262703595a67f313 Mon Sep 17 00:00:00 2001 From: Ahmad Nassri Date: Thu, 8 Feb 2018 18:15:12 -0500 Subject: [PATCH] fix(dev-404-page): route to 404 fails when using plugin-remove-trailing-slashes updating other occurrence of 404 page check as well --- packages/gatsby/cache-dir/root.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby/cache-dir/root.js b/packages/gatsby/cache-dir/root.js index 441f32c0b5a7e..7d383736d7ef0 100644 --- a/packages/gatsby/cache-dir/root.js +++ b/packages/gatsby/cache-dir/root.js @@ -111,7 +111,7 @@ function shouldUpdateScroll(prevRouterProps, { location: { pathname } }) { let noMatch for (let i = 0; i < pages.length; i++) { - if (pages[i].path === `/dev-404-page/`) { + if (/^\/dev-404-page/.test(pages[i].path)) { noMatch = pages[i] break }