also makes the menu points active which redirect to an url hash

This commit is contained in:
SimonGschnell
2024-09-25 13:35:41 +02:00
parent a1fade0489
commit b0a78658cf
+5 -2
View File
@@ -140,8 +140,11 @@ export default {
this.collapse = new bootstrap.Collapse(this.$refs.children, { toggle: false });
}
this.url = window.location.href;
if (window.location.href == this.link) {
this.url = new URL(window.location.href);
if (this.url.hash && this.url.hash.slice(1) == this.entry.titel){
this.$emit("activeEntry", this.entry.content_id);
}
else if (this.url.href == this.link) {
this.$emit("activeEntry", this.entry.content_id);
}
},