From: Eduardo San Martin Morote Date: Wed, 14 Jun 2023 07:41:19 +0000 (+0200) Subject: refactor: state typ X-Git-Tag: v4.2.3~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a2766b35abb27160cd4a6d8756d7b9544d600f4;p=thirdparty%2Fvuejs%2Frouter.git refactor: state typ --- diff --git a/packages/router/src/router.ts b/packages/router/src/router.ts index 48e0d079..9a8c469b 100644 --- a/packages/router/src/router.ts +++ b/packages/router/src/router.ts @@ -938,7 +938,7 @@ export function createRouter(options: RouterOptions): Router { // only consider as push if it's not the first navigation const isFirstNavigation = from === START_LOCATION_NORMALIZED - const state = !isBrowser ? {} : history.state + const state: Partial | null = !isBrowser ? {} : history.state // change URL only if the user did a push/replace and if it's not the initial navigation because // it's just reflecting the url