fix: remove hash when internal jump address has no hash

pull/3635/head
zonemeen 2 years ago
parent ce0ec543bb
commit 17ee19a318

@ -1,4 +1,4 @@
import { computed } from 'vue'
import { computed, watch } from 'vue'
import { ensureStartingSlash } from '../../shared'
import { useData } from './data'
import { hashRef } from './hash'
@ -15,6 +15,10 @@ export function useLangs({
(localeIndex.value === 'root' ? '/' : `/${localeIndex.value}/`)
}))
watch(page, () => {
hashRef.value = location.hash ? location.hash : ''
})
const localeLinks = computed(() =>
Object.entries(site.value.locales).flatMap(([key, value]) =>
removeCurrent && currentLang.value.label === value.label

Loading…
Cancel
Save