dynamic view : do not try to scroll to anchored track if no hash in url
This commit is contained in:
parent
5b98343e84
commit
9cd7195cd9
1 changed files with 2 additions and 0 deletions
|
|
@ -76,6 +76,8 @@ onBeforeMount(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (route.hash.length === 0) return;
|
||||||
|
|
||||||
const selector = route.hash.replace('#', '#track--');
|
const selector = route.hash.replace('#', '#track--');
|
||||||
const targetBtn = document.querySelector(selector);
|
const targetBtn = document.querySelector(selector);
|
||||||
if (targetBtn) {
|
if (targetBtn) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue