mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-27 05:11:29 -04:00
Watching out for finding a null session when getting two games.
This commit is contained in:
parent
cc255086f1
commit
b13504eeb5
1 changed files with 1 additions and 3 deletions
|
@ -17,7 +17,7 @@ sessionSelectionString = 'team totalScore transpiledCode submittedCodeLanguage t
|
|||
sendSessionsResponse = (res) ->
|
||||
(err, sessions) ->
|
||||
if err then return errors.serverError res, "Couldn't get two games to simulate: #{err}"
|
||||
unless sessions.length is 2
|
||||
unless _.filter(sessions).length is 2
|
||||
console.log 'No games to score.', sessions.length
|
||||
res.send 204, 'No games to score.'
|
||||
return res.end()
|
||||
|
@ -110,5 +110,3 @@ findEarliestSubmission = (queryParams, callback) ->
|
|||
return callback err if err
|
||||
result = earliestSubmissionCache[cacheKey] = earliest?.submitDate
|
||||
callback null, result
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue