Skip to content

Commit 7db8766

Browse files
committed
CVERecord: fix on-page navigation to anchors
1 parent 255ae99 commit 7db8766

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/views/CVERecord/CVERecord.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ export default {
149149
$route(to) {
150150
const cveId = to.query?.id;
151151
if (cveId) {
152+
if (to.hash && cveId === this.cveId) {
153+
154+
// The route contains an in-page anchor ("#...") with the currently
155+
// displayed CVE ID. Simply return to allow the router to handle the
156+
// scrolling to the anchor point.
157+
158+
return;
159+
}
160+
152161
this.cveId = this.cveIdToUpperCase(cveId);
153162
this.validateCveId();
154163
if (!this.disabled) {

0 commit comments

Comments
 (0)