mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-04 10:16:45 +00:00
infra: enable no-negated-condition eslint rule (#3283)
* infra: enable no-negated-condition eslint rule * dev * dev
This commit is contained in:
@@ -89,7 +89,7 @@ const GRAPHQL_STATS_QUERY = `
|
||||
* @returns {Promise<AxiosResponse>} Axios response.
|
||||
*/
|
||||
const fetcher = (variables, token) => {
|
||||
const query = !variables.after ? GRAPHQL_STATS_QUERY : GRAPHQL_REPOS_QUERY;
|
||||
const query = variables.after ? GRAPHQL_REPOS_QUERY : GRAPHQL_STATS_QUERY;
|
||||
return request(
|
||||
{
|
||||
query,
|
||||
@@ -138,10 +138,10 @@ const statsFetcher = async ({
|
||||
|
||||
// Store stats data.
|
||||
const repoNodes = res.data.data.user.repositories.nodes;
|
||||
if (!stats) {
|
||||
stats = res;
|
||||
} else {
|
||||
if (stats) {
|
||||
stats.data.data.user.repositories.nodes.push(...repoNodes);
|
||||
} else {
|
||||
stats = res;
|
||||
}
|
||||
|
||||
// Disable multi page fetching on public Vercel instance due to rate limits.
|
||||
|
||||
Reference in New Issue
Block a user