Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Ensure deepest layout is always refreshed on goto #484

Merged
merged 1 commit into from
Feb 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion templates/src/client/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}