]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: small fix
authorEduardo San Martin Morote <posva13@gmail.com>
Tue, 7 Jan 2025 13:22:51 +0000 (14:22 +0100)
committerEduardo San Martin Morote <posva13@gmail.com>
Tue, 7 Jan 2025 13:22:51 +0000 (14:22 +0100)
packages/router/src/experimental/router.ts

index 3c79d2c696697dd1c17e75dcf3e529eb81dfbb40..95762e89996dc3746f3c8696496a6c658ed902a5 100644 (file)
@@ -536,10 +536,10 @@ export function experimental_createRouter(
 
       if (
         typeof rawLocation === 'object' &&
-        rawLocation.hash?.startsWith('#')
+        !rawLocation.hash?.startsWith('#')
       ) {
         warn(
-          `A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`
+          `A \`hash\` should always start with the character "#". Replace "${rawLocation.hash}" with "#${rawLocation.hash}".`
         )
       }
     }