Skip to content

Commit a9e0b69

Browse files
authored
fix(3852): select "next" in version select (#3906)
1 parent aa0ba32 commit a9e0b69

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/starlight/LanguageSelect.astro

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ import Select from "@astrojs/starlight/components/Select.astro";
2222
constructor() {
2323
super();
2424

25-
this.querySelector('select')?.addEventListener('change', (e) => {
25+
const el = this.querySelector("select");
26+
27+
if (!el) return;
28+
29+
const host = window.location.host;
30+
const subdomain = host.split(".")[0];
31+
if (subdomain === "next") {
32+
el.value = "next";
33+
}
34+
35+
el.addEventListener("change", (e) => {
2636
const value = (e.currentTarget as HTMLSelectElement).value;
2737

2838
let url: URL;

0 commit comments

Comments
 (0)