fix(nitro): sort middleware fron long to short

This commit is contained in:
Pooya Parsa 2021-05-24 13:24:56 +02:00
parent a82e7b9008
commit 03173075da

View File

@ -31,7 +31,7 @@ function filesToMiddleware (files: string[], baseDir: string, basePath: string,
handle
}
})
.sort((a, b) => a.route.localeCompare(b.route))
.sort((a, b) => b.route.localeCompare(a.route))
.map(m => ({ ...m, ...overrides }))
}