Improved error handling.
This commit is contained in:
parent
06f02b2298
commit
d5421e38ee
1 changed files with 3 additions and 1 deletions
|
@ -29,7 +29,9 @@ class Index extends App.Controller
|
|||
|
||||
delete: (e) =>
|
||||
e.preventDefault()
|
||||
id = $(e.target).closest('a').data('device-id')
|
||||
id = $(e.target).data('device-id')
|
||||
if !id
|
||||
id = $(e.target).closest('a').data('device-id')
|
||||
console.log('ID', id)
|
||||
# get data
|
||||
@ajax(
|
||||
|
|
Loading…
Reference in a new issue