]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
fix: relative locations fullPath
authorEduardo San Martin Morote <posva13@gmail.com>
Sun, 17 Aug 2025 13:18:41 +0000 (15:18 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Sun, 17 Aug 2025 13:18:41 +0000 (15:18 +0200)
packages/router/src/experimental/route-resolver/resolver-fixed.spec.ts
packages/router/src/experimental/route-resolver/resolver-fixed.ts

index 30b934d29eb6012dee9fda37ee460f40151d2bbd..1050f66840850a9f1b83fa3255e8b089ebeba74f 100644 (file)
@@ -168,6 +168,7 @@ describe('fixed resolver', () => {
         ).toMatchObject({
           params: {},
           path: '/nested/foo',
+          fullPath: '/nested/foo',
           query: {},
           hash: '',
         })
@@ -179,6 +180,7 @@ describe('fixed resolver', () => {
         ).toMatchObject({
           params: {},
           path: '/foo',
+          fullPath: '/foo',
           query: {},
           hash: '',
         })
@@ -190,6 +192,7 @@ describe('fixed resolver', () => {
         ).toMatchObject({
           params: {},
           path: '/nested/foo',
+          fullPath: '/nested/foo',
           query: {},
           hash: '',
         })
index 25e11b17ef835bab34b0fbeb8f36af5947de4166..b60afd955778d79ba9a7e4d9e9d4bce3f374c640 100644 (file)
@@ -224,9 +224,10 @@ export function createFixedResolver<
         url = parseURL(parseQuery, to, currentLocation?.path)
       } else {
         const query = normalizeQuery(to.query)
+        const path = resolveRelativePath(to.path, currentLocation?.path || '/')
         url = {
-          fullPath: NEW_stringifyURL(stringifyQuery, to.path, query, to.hash),
-          path: resolveRelativePath(to.path, currentLocation?.path || '/'),
+          fullPath: NEW_stringifyURL(stringifyQuery, path, query, to.hash),
+          path,
           query,
           hash: to.hash || '',
         }