Properly call error callback in ajax utility
This commit is contained in:
parent
69ac8e1a00
commit
63ddf332a8
|
@ -143,7 +143,7 @@ ajax = Em.Object.create
|
||||||
options.success.call(options.context, data, xhr.status, xhr)
|
options.success.call(options.context, data, xhr.status, xhr)
|
||||||
else
|
else
|
||||||
reject(xhr)
|
reject(xhr)
|
||||||
options.error.call(data, xhr.status, xhr)
|
options.error.call(options.context, data, xhr.status, xhr)
|
||||||
|
|
||||||
data = options.data
|
data = options.data
|
||||||
if typeof(options.data) == "object" && (Ember.isNone(options.contentType) || options.contentType.match /application\/json/)
|
if typeof(options.data) == "object" && (Ember.isNone(options.contentType) || options.contentType.match /application\/json/)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user