]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
wip: tpm fix for typings
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 17 Sep 2019 14:40:38 +0000 (16:40 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 17 Sep 2019 14:40:38 +0000 (16:40 +0200)
src/router.ts

index fb5310f9b99c51be4cd7209122b89a3126fd26f3..5fa9139218d54375c98415cf23484279cb073c5e 100644 (file)
@@ -135,9 +135,21 @@ export class Router {
     })
   }
 
-  resolve(to: RouteLocation, currentLocation?: RouteLocationNormalized/*, append?: boolean */) {
-    if (typeof to === 'string') return this.resolveLocation(this.history.utils.normalizeLocation(to), currentLocation)
-    return this.resolveLocation(to)
+  resolve(
+    to: RouteLocation,
+    currentLocation?: RouteLocationNormalized /*, append?: boolean */
+  ) {
+    if (typeof to === 'string')
+      return this.resolveLocation(
+        this.history.utils.normalizeLocation(to),
+        currentLocation
+      )
+    return this.resolveLocation({
+      // TODO: refactor with url utils
+      query: {},
+      hash: '',
+      ...to,
+    })
   }
 
   resolveLocation(