refactor: remove arrow function body braces (#1917)

This commit is contained in:
Kisaragi 2022-08-02 19:26:07 +09:00 committed by GitHub
parent 7ceec92455
commit b6d75b2e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,14 +68,10 @@ async function fetchTopLanguages(username, exclude_repo = []) {
// filter out repositories to be hidden
repoNodes = repoNodes
.sort((a, b) => b.size - a.size)
.filter((name) => {
return !repoToHide[name.name];
});
.filter((name) => !repoToHide[name.name]);
repoNodes = repoNodes
.filter((node) => {
return node.languages.edges.length > 0;
})
.filter((node) => node.languages.edges.length > 0)
// flatten the list of language nodes
.reduce((acc, curr) => curr.languages.edges.concat(acc), [])
.reduce((acc, prev) => {