Improved error handling.

This commit is contained in:
Martin Edenhofer 2015-08-17 17:36:52 +02:00
parent 06f02b2298
commit d5421e38ee

View file

@ -29,7 +29,9 @@ class Index extends App.Controller
delete: (e) => delete: (e) =>
e.preventDefault() 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) console.log('ID', id)
# get data # get data
@ajax( @ajax(