Added sanity checks in BS tables formatter

This commit is contained in:
snipe 2017-11-22 06:20:51 -08:00
parent 538757317b
commit 9430c4bf43

View file

@ -448,7 +448,7 @@
}
function assetCompanyObjFilterFormatter(value, row) {
if (row.company) {
if ((row) && (row.company)) {
return '<a href="{{ url('/') }}/hardware/?company_id=' + row.company.id + '"> ' + row.company.name + '</a>';
}
}
@ -463,7 +463,7 @@
function employeeNumFormatter(value, row) {
if ((row.assigned_to) && ((row.assigned_to.employee_number))) {
if ((row) && (row.assigned_to) && ((row.assigned_to.employee_number))) {
return '<a href="{{ url('/') }}/users/' + row.assigned_to.id + '"> ' + row.assigned_to.employee_number + '</a>';
}
}