fix: include middlewares and layouts for error pages (#2598)

Fixes https://github.com/denoland/fresh/issues/2594
This commit is contained in:
Marvin Hagemeister
2024-07-16 10:53:38 +02:00
committed by GitHub
parent 3f78058ae9
commit b510113655
2 changed files with 12 additions and 8 deletions
+3 -3
View File
@@ -438,10 +438,10 @@ export function sortRoutePaths(a: string, b: string) {
function getRoutePathScore(char: string, s: string, i: number): number {
if (char === "_") {
if (i + 1 < s.length) {
if (s[i + 1] === "e") return 6;
if (s[i + 1] === "m") return 5;
if (s[i + 1] === "e") return 4;
if (s[i + 1] === "m") return 6;
}
return 4;
return 5;
} else if (char === "[") {
if (i + 1 < s.length && s[i + 1] === ".") {
return 0;