jesus2099 / konami-command

power‐ups for various web sites
121 stars 25 forks source link

USER_STATS: Percentage calculation fails when cell is empty #836

Closed nimuxoha closed 3 months ago

nimuxoha commented 3 months ago

It seems when one of the cells under "added entities" is empty the whole calculation fails and shows NaN everywhere instead:

beta musicbrainz org

This is currently in beta (MBS-13647) https://github.com/metabrainz/musicbrainz-server/pull/3301

jesus2099 commented 3 months ago

It's an MBS bug, kind of. Usually when it's 0 added entities, the whole row does not appear.

jesus2099 commented 3 months ago

So apparently it's just a temporary glitch because _the stats are cached and it's not 0 for event_art in the cached object, it's undefined_.

jesus2099 commented 3 months ago

Thank you for reporting, @nimuxoha, I have decided to fix it, even if it is rare and temporary. :)