mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 11:18:24 +02:00
handle case where there is no github repo
This commit is contained in:
parent
c0cc79f995
commit
a76a887901
1 changed files with 20 additions and 17 deletions
|
@ -68,6 +68,8 @@ module.exports = async function processMetadata(
|
|||
| grep -I "^author " | sort | uniq -c | sort -nr; \
|
||||
`
|
||||
).toString().split('\n');
|
||||
/* handle case where it's not github repo */
|
||||
if (results.length && results[0].length) {
|
||||
let authorData;
|
||||
const authors = [];
|
||||
let totalLineCount = 0;
|
||||
|
@ -86,6 +88,7 @@ module.exports = async function processMetadata(
|
|||
|
||||
metadata.authors = authors;
|
||||
metadata.totalLineCount = totalLineCount;
|
||||
}
|
||||
|
||||
/* language */
|
||||
const language = getLanguage(filepath, refDir, env);
|
||||
|
|
Loading…
Add table
Reference in a new issue