Ensure deepest layout is always refreshed on goto

This commit is contained in:
mrkishi
2018-10-18 18:14:23 -03:00
parent e5d7d8ab2b
commit 8108642845

View File

@@ -217,6 +217,10 @@ export function prepare_page(target: Target): Promise<{
segments[changed_from] === new_segments[changed_from]
) changed_from += 1;
if (changed_from === new_segments.length) {
changed_from -= 1;
}
let redirect: Redirect = null;
let error: { statusCode: number, message: Error | string } = null;
@@ -383,4 +387,4 @@ function detach(node: Node) {
function changed(a: Record<string, string | true>, b: Record<string, string | true>) {
return JSON.stringify(a) !== JSON.stringify(b);
}
}