We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a5d7233 commit 53252a1Copy full SHA for 53252a1
api/src/modules/ratings/ratings.service.ts
@@ -216,10 +216,10 @@ export class RatingService {
216
let blackRating = 0;
217
let whiteAdjustedRating = 0;
218
let blackAdjustedRating = 0;
219
- if (player_white.unrated) {
+ if (player_white && player_white.unrated) {
220
player_white = null;
221
}
222
- if (player_black.unrated) {
+ if (player_black && player_black.unrated) {
223
player_black = null;
224
225
// check if player_white exists and set whiteRating and whiteAdjustedRating
0 commit comments