VRFS-1028 - Fixed an issue where a user has no instruments.

This is probably an edge case, but Test User (id: 1) has no instruments,
so this was not rendering and throwing a javascript error.
This commit is contained in:
Daniel Weigh 2014-02-18 02:15:44 -05:00
parent b919dbadd8
commit bb68fbf596
1 changed files with 5 additions and 3 deletions

View File

@ -26,9 +26,11 @@
musicianHtml += '<td width="75"><a href="#">' + val.name + '</a></td>';
instrumentHtml = '<td><div class="nowrap">';
$.each(val.instruments, function(index, instrument) {
instrumentHtml += '<img src="' + instrumentLogoMap[instrument.instrument_id] + '" width="24" height="24" />&nbsp;';
});
if (val.instruments) { // @FIXME: edge case for Test user that has no instruments?
$.each(val.instruments, function(index, instrument) {
instrumentHtml += '<img src="' + instrumentLogoMap[instrument.instrument_id] + '" width="24" height="24" />&nbsp;';
});
}
instrumentHtml += '</div></td>';