Archives versions dropdown doesn't load if one of two last majors is missing
When a new major GitLab version is released, we tend to not include the last major in the last_majors
list in versions.json
, because that would cause duplicate entries in the main site's dropdown.
Here how it was done in the 16.0 release gitlab-docs!3864 (comment 1400673875).
However, the archives versions dropdown relied on last_majors
being a list with two items, thus it's now failing to load the versions.
How to reproduce
- Visit https://archives.docs.gitlab.com/.
- Open a browser console and reload the page.
- You see the following error:
TypeError: e.last_major[1] is undefined