mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): strip version build info from docs link URLs (#14601)
This commit is contained in:
@@ -9,7 +9,7 @@ function defaultDocsUrl(): string {
|
||||
}
|
||||
|
||||
// Strip the postfix version info that's not part of the link.
|
||||
const i = version?.indexOf("-") ?? -1;
|
||||
const i = version?.match(/[+-]/)?.index ?? -1;
|
||||
if (i >= 0) {
|
||||
version = version.slice(0, i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user