fix: do not skip app-wrapper for sibling routes (#2911)
This PR adds a unit test for the issue in #2910. I have not found a solution yet, since I'm not very familiar with the `fsRoutes` code, and what it is doing. But a thought a unit test with the failing code could help to find a bug fix. **Edit:** I managed to fix the failing test by removing a couple of lines, but I'm not too familiar with the code so I'm not sure if it's correct. It seems to pass all the tests still... Closes #2910
This commit is contained in:
@@ -221,12 +221,10 @@ export async function fsRoutes<State>(
|
||||
|
||||
// _app template
|
||||
if (skipApp && mod.path === "/_app") {
|
||||
hasApp = false;
|
||||
continue;
|
||||
} else if (!skipApp && mod.config?.skipAppWrapper) {
|
||||
skipApp = true;
|
||||
if (hasApp) {
|
||||
hasApp = false;
|
||||
// _app component is always first
|
||||
components.shift();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user