Skip to content

Commit

Permalink
Update version validation to recognize 'dev' as a valid version
Browse files Browse the repository at this point in the history
  • Loading branch information
mdapena authored Oct 17, 2024
1 parent 874986b commit 5c1da25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// Extract the version from the pathname (second segment after the first slash)
const version = pathname.split('/')[2];

// Check if the extracted version is valid (either a version number or "latest")
const hasVersion = version && /^(latest|\d+\.\d+)$/.test(version);
// Check if the extracted version is valid (either a version number or "dev/latest")
const hasVersion = version && /^(dev|latest|\d+\.\d+)$/.test(version);

// Redirect based on the presence of a version
if (!hasVersion) {
Expand Down

0 comments on commit 5c1da25

Please sign in to comment.