Skip to content

Commit 0b0fac9

Browse files
committed
chore(fix): Detect nightly tab
Correctly detect that we're in the "Nightly" tab, by checking if the URL contains the `/nightly/` path.
1 parent 8ca8dee commit 0b0fac9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

templates/html.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@
821821
</div>
822822
<div class="view-switch" role="navigation" aria-label="Report view">
823823
<a href="/index.html" data-view="latest">Latest</a>
824-
<a href="/nightly/" data-view="nightly">Nightly</a>
824+
<a href="/nightly/index.html" data-view="nightly">Nightly</a>
825825
</div>
826826
<div class="severity-info">
827827
<div class="severity-box" id="critical">
@@ -1357,7 +1357,7 @@
13571357
}
13581358

13591359
const path = window.location.pathname || '';
1360-
const activeView = path.endsWith('nightly.html') ? 'nightly' : 'latest';
1360+
const activeView = path.includes('/nightly/') ? 'nightly' : 'latest';
13611361

13621362
switcher.querySelectorAll('a[data-view]').forEach(link => {
13631363
if (link.dataset.view === activeView) {

0 commit comments

Comments
 (0)