You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The boolean query parameters, such as show_icons, hide_border and hide_rank, are being incorrectly parsed, as passing false to them has the same effect as if passing true:
All true
With all the settings set to true, the behavior is as expected.
I believe what's happening is that the only thing being checked is whether they exist or not, and not what their values actually are.
This isn't directly affecting the usage, but is a small detail that can be rather confusing at times.
For example, I like to tweak the settings from time to time, and to make it easier, I like to have all the settings explicitly declared, so I can easily see which ones are available, and simply change their values. With the way the query is being parsed right now, that wouldn't be an option, as I'd actually have to remove the setting completely in order to change its effect.
The text was updated successfully, but these errors were encountered:
The boolean query parameters, such as
show_icons
,hide_border
andhide_rank
, are being incorrectly parsed, as passingfalse
to them has the same effect as if passingtrue
:All
true
With all the settings set to
true
, the behavior is as expected.https://github-readme-stats.vercel.app/api?username=MicaelJarniac&show_icons=true&hide_border=true&hide_rank=true
All
false
But with all settings set to
false
, the behavior should be the same as the default one, with no extra query at all, but it isn't.https://github-readme-stats.vercel.app/api?username=MicaelJarniac&show_icons=false&hide_border=false&hide_rank=false
Default (no extra query)
https://github-readme-stats.vercel.app/api?username=MicaelJarniac
I believe what's happening is that the only thing being checked is whether they exist or not, and not what their values actually are.
This isn't directly affecting the usage, but is a small detail that can be rather confusing at times.
For example, I like to tweak the settings from time to time, and to make it easier, I like to have all the settings explicitly declared, so I can easily see which ones are available, and simply change their values. With the way the query is being parsed right now, that wouldn't be an option, as I'd actually have to remove the setting completely in order to change its effect.
The text was updated successfully, but these errors were encountered: