Only try to return the asset tag link if a valid asset id has been passed

This commit is contained in:
snipe 2019-01-16 02:19:35 -08:00
parent a1f93e733c
commit c055e3af21

View file

@ -435,7 +435,11 @@
}
function assetTagLinkFormatter(value, row) {
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '"> ' + row.asset.asset_tag + '</a>';
if ((row.asset) && (row.asset.id)) {
return '<a href="{{ url('/') }}/hardware/' + row.asset.id + '"> ' + row.asset.asset_tag + '</a>';
}
return '';
}
function assetNameLinkFormatter(value, row) {