chore: fix yarn build:website:fast (#6421)

This commit is contained in:
Sébastien Lorber 2022-01-20 15:51:59 +01:00 committed by GitHub
parent 4e69c052d6
commit aaf748c1ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,9 @@ function PackageJson() {
const allVersions = useVersions();
// Only happens in deploy preview / local dev, but still nice
const versionName =
latestVersion.name === 'current' ? allVersions[1].name : latestVersion.name;
latestVersion.name === 'current' && allVersions.length > 1
? allVersions[1].name
: latestVersion.name;
return (
<CodeBlock language="json" title="package.json">{`{
"dependencies": {