diff --git a/static/js/prefMatrix.jsx b/static/js/prefMatrix.jsx index ef3a3ec..e2ecbdf 100644 --- a/static/js/prefMatrix.jsx +++ b/static/js/prefMatrix.jsx @@ -27,18 +27,24 @@ class PreferenceMatrix extends React.Component { else return false; }); - var Title = " "; + var Title = "Not Assigned/Eliminated"; if(aP) Title = aP["Title"]; var pref = this.sProjPrefs.find( (pe) => pe["stuapp"] == re["id"]); - this.colHeaders.map( (ce) => { - var iter = ["1","2","3","4","5"]; - var val = iter.find( (con) => ce["id"]==pref["ProjectPreference"+con]); - if(val) - prefCols.push({val}); - else + if(pref) { + this.colHeaders.map((ce) => { + var iter = ["1", "2", "3", "4", "5"]; + var val = iter.find((con) => ce["id"] == pref["ProjectPreference" + con]); + if (val) + prefCols.push({val}); + else + prefCols.push( ); + }); + }else{ + this.colHeaders.map((ce) => { prefCols.push( ); - }); + }); + } return( {re["LastName"] + " " + re["FirstName"]} {Title}