From 8108642845b1c3635bf46bb561b1376aa10491d5 Mon Sep 17 00:00:00 2001 From: mrkishi Date: Thu, 18 Oct 2018 18:14:23 -0300 Subject: [PATCH] Ensure deepest layout is always refreshed on goto --- templates/src/client/app.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/src/client/app.ts b/templates/src/client/app.ts index 43b076485..09382bd42 100644 --- a/templates/src/client/app.ts +++ b/templates/src/client/app.ts @@ -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, b: Record) { return JSON.stringify(a) !== JSON.stringify(b); -} \ No newline at end of file +}