]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
refactor: state typ
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 14 Jun 2023 07:41:19 +0000 (09:41 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 14 Jun 2023 07:41:19 +0000 (09:41 +0200)
packages/router/src/router.ts

index 48e0d079990be3b5337cb7a6d302db92ca1d20fe..9a8c469be39d9c22471db694a05a334f201e6734 100644 (file)
@@ -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<HistoryState> | 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