Skip to content

Commit d76f7a1

Browse files
committed
Do not exclude if only language
1 parent 4ffb34f commit d76f7a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/repo_language_stats.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ func (stats LanguageStatList) getLanguagePercentages() map[string]float32 {
5757
var total int64
5858
for _, stat := range stats {
5959
// Exclude specific languages from percentage calculation
60-
if _, ok := specialLanguages[stat.Language]; ok {
60+
if _, ok := specialLanguages[stat.Language]; ok && len(stats) > 1 {
6161
continue
6262
}
6363
total += stat.Size
6464
}
6565
for _, stat := range stats {
6666
// Exclude specific languages from percentage calculation
67-
if _, ok := specialLanguages[stat.Language]; ok {
67+
if _, ok := specialLanguages[stat.Language]; ok && len(stats) > 1 {
6868
continue
6969
}
7070
perc := float32(math.Round(float64(stat.Size)/float64(total)*1000) / 10)

0 commit comments

Comments
 (0)