🐛Classroom last played string null level check

This commit is contained in:
Matt Lott 2016-07-19 10:10:48 -07:00
parent 7bf3fc6a78
commit 01a8312617

View file

@ -157,7 +157,10 @@ module.exports = class ClassroomView extends RootView
course = session.collection.course
levelOriginal = session.get('level').original
level = @levels.findWhere({original: levelOriginal})
return "#{course.get('name')}, #{level.get('name')}"
lastPlayed = ""
lastPlayed += course.get('name') if course
lastPlayed += ", #{level.get('name')}" if level
lastPlayed
userPlaytimeString: (user) ->
return '' unless user.sessions?