Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docfx_project/public/version-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@
// on /versions/latest/. On every other page the highest-
// numbered v* entry already represents the latest release
// and surfacing both is redundant; on /versions/latest/ we
// NEED `latest` in the list because otherwise the picker
// would show no selected option and the reader would have
// no way to know which version they are viewing.
// NEED `latest` in the list because without it the browser auto-
// selects the first concrete version (whichever v* is top of
// the list), and choosing that same value doesn't fire
// `change`, so the reader can't navigate away to the
// concrete-version URL.
if (v.version === 'latest' && currentVersion !== 'latest') return;
var opt = document.createElement('option');
opt.value = v.url;
Expand Down