mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix hash link in docs module (#7768)
This commit is contained in:
@@ -131,11 +131,14 @@ export default defineComponent({
|
||||
if (link.startsWith('http') || link.startsWith('#')) return;
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
const parts = link.split('#');
|
||||
|
||||
parts[0] = parts[0].endsWith('/') ? parts[0].slice(0, -1) : parts[0];
|
||||
|
||||
router.push({
|
||||
path: `/docs${parts[0]}`,
|
||||
hash: parts[1],
|
||||
hash: `#${parts[1]}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user