fix(v2): show dropdown instead of a single button when there are two versions (#3472)

This commit is contained in:
Sam Zhou 2020-09-22 11:20:50 -04:00 committed by GitHub
parent 521ef59908
commit 0ad8958438
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ export default function DocsVersionDropdownNavbarItem({
// We don't want to render a version dropdown with 0 or 1 item
// If we build the site with a single docs version (onlyIncludeVersions: ['1.0.0'])
// We'd rather render a buttonb instead of a dropdown
if (versions.length <= 2) {
if (versions.length <= 1) {
return undefined;
}