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

index 375af5d8086ad093b2a2c4b567be3c2f99fcf71e..25e11b17ef835bab34b0fbeb8f36af5947de4166 100644 (file)
@@ -182,7 +182,7 @@ export function createFixedResolver<
           throw new Error(`Record "${String(name)}" not found`)
         }
 
-        if (typeof to === 'object' && to.hash && to.hash.startsWith('#')) {
+        if (typeof to === 'object' && to.hash && !to.hash.startsWith('#')) {
           warn(
             `A \`hash\` should always start with the character "#". Replace "${to.hash}" with "#${to.hash}".`
           )