mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Only try to return the asset tag link if a valid asset id has been passed
This commit is contained in:
parent
a1f93e733c
commit
c055e3af21
|
@ -435,7 +435,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function assetTagLinkFormatter(value, row) {
|
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) {
|
function assetNameLinkFormatter(value, row) {
|
||||||
|
|
Loading…
Reference in a new issue