mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 09:37:37 +02:00
Fix version.js script for when there are no versions yet
This commit is contained in:
parent
de2897f108
commit
fd01449db2
1 changed files with 6 additions and 1 deletions
|
@ -17,7 +17,12 @@ const readMetadata = require("./server/readMetadata.js");
|
||||||
const versionFallback = require("./server/versionFallback.js");
|
const versionFallback = require("./server/versionFallback.js");
|
||||||
|
|
||||||
const CWD = process.cwd();
|
const CWD = process.cwd();
|
||||||
const versions = require(CWD + "/versions.json");
|
let versions;
|
||||||
|
if (fs.existsSync(CWD + "/versions.json")) {
|
||||||
|
versions = require(CWD + "/versions.json");
|
||||||
|
} else {
|
||||||
|
versions = [];
|
||||||
|
}
|
||||||
|
|
||||||
let version;
|
let version;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue