Skip to content

Commit

Permalink
Contributions count not updating multiverseweb#303
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan20-10 authored Nov 6, 2024
1 parent f35062a commit aa9ac03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/scripts/contributor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function fetchData() {
// Render stats
function renderStats(repoStats, contributors) {
const statsGrid = document.getElementById('statsGrid');
const totalContributions = contributors.reduce((sum,contributor) => sum + contributor.contributions,0);
const totalContributions = contributors?.reduce((sum,contributor) => sum + contributor.contributions,0) || 0;
const stats = [
{ label: 'Contributors', value: contributors.length, icon: 'users' },
{ label: 'Total Contributions', value: totalContributions, icon: 'git-commit' },
Expand Down Expand Up @@ -106,4 +106,4 @@ function scrollToContribute() {
}

// Initialize the page when the DOM is loaded
document.addEventListener('DOMContentLoaded', init);
document.addEventListener('DOMContentLoaded', init);

0 comments on commit aa9ac03

Please sign in to comment.