anuraghazra / github-readme-stats

:zap: Dynamically generated stats for your github readmes
https://github-readme-stats.vercel.app
MIT License
68.31k stars 22.39k forks source link

NAN for language Percentage #2735

Open CEbbinghaus opened 1 year ago

CEbbinghaus commented 1 year ago

Describe the bug

When using the following url:

https://github-readme-stats.vercel.app/api/top-langs?theme=dark&size_weight=0&count_weight=1langs_count=10&layout=compact&username=cebbinghaus&hide=javascript,c,html,css&exclude_repo=srb2kart&aieBootstrap

The languages all show NaN for the Percentage.

Expected behavior

The correct Percentages should be shown

Screenshots / Live demo link

Screenshot: image Live demo: demo

Additional context

No response

CEbbinghaus commented 1 year ago

The URL is malformed since there is a & missing after count_weight but I would expect it to spit out an error rather than NaN

rickstaa commented 1 year ago

The URL is malformed since there is a & missing after count_weight but I would expect it to spit out an error rather than NaN

@CEbbinghaus thanks for bringing this bug to our attention. It would be wonderful if you can create a pull request to resolve this issue. You can read how to contribute in CONTRIBUTING.md.

manhhungpc commented 1 year ago

@rickstaa here is my fix for this issue, please see in #2761