undefined's All-Time Stats
Closed this issue · 6 comments
@Saibamen This is on the stats page, but player's name is fetched from other endpoint I believe. Stats endpoint is only returning weapon statistics in an array. Generally, this page triggers couple of HTTP calls to different endpoints: players list, MMR ratings, recent matches and the weapon stats (which is issue #22).
That has to be related to something else, since I am not returning in any case player's name. I will check what the page is calling.
It doesn't seem like any endpoint which could get username is being called when stats open. maybe its retrieved from stats.json somehow.
Yeah, it seems it is extracted from stats.json which is the last 5 matches.
This is the code in stats.html that populates it:
document.getElementById('PlayerName').innerHTML = Stats.PlayerName;
Then the only way to "fix" this would be to respond with a fake stats.json when its empty. I'll try to do that.