mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Fix JS error when there is no row.update/delete defined
This commit is contained in:
parent
53ba2bbb4e
commit
ebbc2a60c3
|
@ -120,11 +120,11 @@ $('.snipe-table').bootstrapTable({
|
|||
|
||||
var actions = '<nobr>';
|
||||
|
||||
if (row.available_actions.update === true) {
|
||||
if ((row.available_actions) && (row.available_actions.update === true)) {
|
||||
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '/edit" class="btn btn-sm btn-warning"><i class="fa fa-pencil"></i></a> ';
|
||||
}
|
||||
|
||||
if (row.available_actions.delete === true) {
|
||||
if ((row.available_actions) && (row.available_actions.delete === true)) {
|
||||
actions += '<a href="{{ url('/') }}/' + destination + '/' + row.id + '" '
|
||||
+ ' class="btn btn-danger btn-sm delete-asset" '
|
||||
+ ' data-toggle="modal" '
|
||||
|
|
Loading…
Reference in a new issue