From 1db443fbd3194515611bd8c3930c74a75eaecf73 Mon Sep 17 00:00:00 2001 From: JoseAlvesdev Date: Sat, 7 Sep 2024 18:13:36 -0300 Subject: [PATCH] refactor: router.ts. --- src/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router.ts b/src/router.ts index 0f22090..a8ae510 100644 --- a/src/router.ts +++ b/src/router.ts @@ -40,7 +40,7 @@ const router: () => Promise = async (): Promise => { if (!match) { match = { - route: routes[routes.length - 1], + route: routes.find((route: IRoute): boolean => route.path === '/404') || routes[routes.length - 1], isMatch: true }; }