mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-20 14:25:07 +00:00
Ensure deepest layout is always refreshed on goto
This commit is contained in:
@@ -217,6 +217,10 @@ export function prepare_page(target: Target): Promise<{
|
|||||||
segments[changed_from] === new_segments[changed_from]
|
segments[changed_from] === new_segments[changed_from]
|
||||||
) changed_from += 1;
|
) changed_from += 1;
|
||||||
|
|
||||||
|
if (changed_from === new_segments.length) {
|
||||||
|
changed_from -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
let redirect: Redirect = null;
|
let redirect: Redirect = null;
|
||||||
let error: { statusCode: number, message: Error | string } = 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>) {
|
function changed(a: Record<string, string | true>, b: Record<string, string | true>) {
|
||||||
return JSON.stringify(a) !== JSON.stringify(b);
|
return JSON.stringify(a) !== JSON.stringify(b);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user