Fix another error I saw in the logs

This commit is contained in:
Nick Winter 2016-05-08 20:59:58 -07:00
parent d0be5c1f22
commit 2faca0419b

View file

@ -23,7 +23,7 @@ class LevelSessionHandler extends Handler
not document.submittedCode # TODO: only allow leaderboard access to non-top-5 solutions
document = _.omit document, @privateProperties
if req.query.interpret
plan = submittedCode[if document.team is 'humans' then 'hero-placeholder' else 'hero-placeholder-1'].plan
plan = submittedCode[if document.team is 'humans' then 'hero-placeholder' else 'hero-placeholder-1']?.plan ? ''
plan = LZString.compressToUTF16 plan
document.interpret = plan
document.code = submittedCode