Open steve-chen-nyc opened 8 years ago
If a player didn't play in the team's most recent game, then the string returned is '', crashing the app.
Mongoose query searches for the last game based on the player's team, not the player's activity.
We need to: change the query for game stats to return 10 objects instead of 1. The program will then automatically search for the most recent game and render that data. This leaves open the possibility of the player having NO data, but then who cares about that player anyway.
if there aren't any results for yesterday's game app may crash.