From 8c57b31c5453d1a92b4dd8f3a20b345664f4e139 Mon Sep 17 00:00:00 2001
From: Nick Winter <livelily@gmail.com>
Date: Tue, 11 Mar 2014 18:06:48 -0700
Subject: [PATCH] Fixed a couple bugs with the matches tab.

---
 app/templates/play/ladder/my_matches_tab.jade | 5 +++--
 app/views/play/ladder/my_matches_tab.coffee   | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/app/templates/play/ladder/my_matches_tab.jade b/app/templates/play/ladder/my_matches_tab.jade
index 8cacdb49f..b9cf618a2 100644
--- a/app/templates/play/ladder/my_matches_tab.jade
+++ b/app/templates/play/ladder/my_matches_tab.jade
@@ -52,8 +52,9 @@ div#columns.row
             if team.isRanking
               td(colspan=4).alert.alert-info
                 | Your new code is being simulated by other players for ranking.
+                | This will refresh as new matches come in.
             else
               td(colspan=4).alert.alert-warning
-                | No ranked matches for this team!
+                | No ranked matches for the #{team.name} team!
                 | Play against some competitors and then come back here to get your game ranked.
-      
+
diff --git a/app/views/play/ladder/my_matches_tab.coffee b/app/views/play/ladder/my_matches_tab.coffee
index 278bcb9b0..073b80a0c 100644
--- a/app/views/play/ladder/my_matches_tab.coffee
+++ b/app/views/play/ladder/my_matches_tab.coffee
@@ -71,7 +71,7 @@ module.exports = class MyMatchesTabView extends CocoView
     for team in @teams
       team.session = (s for s in @sessions.models when s.get('team') is team.id)[0]
       team.readyToRank = @readyToRank(team.session)
-      team.isRanking = team.session.get('isRanking')
+      team.isRanking = team.session?.get('isRanking')
       team.matches = (convertMatch(match, team.session.get('submitDate')) for match in team.session?.get('matches') or [])
       team.matches.reverse()
       team.score = (team.session?.get('totalScore') or 10).toFixed(2)