Skip to content

Commit

Permalink
fallback on version if name missing
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Aug 13, 2021
1 parent f750248 commit 8a80b02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pydata_sphinx_theme/_templates/switcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
// correct (for now, links will go to doc version homepage)
$.each(data, function(index, entry) {
entry.url = buildURL("{{ switcher_template_url }}", entry);
if (!("name" in entry)) {
entry.name = entry.version;
}
$("#switcher").append(`<a class="list-group-item list-group-item-action py-1" href="${entry.url}">${entry.name}</a>`);
});
// see if the current page exists in the other versions of the docs
Expand Down

0 comments on commit 8a80b02

Please sign in to comment.