[fix] request success callback
This commit is contained in:
parent
dceec690ad
commit
127134e700
1 changed files with 3 additions and 3 deletions
|
|
@ -28,14 +28,14 @@ frappe.call = function(opts) {
|
|||
args.cmd = opts.method;
|
||||
}
|
||||
|
||||
var callback = function(data, xhr) {
|
||||
var callback = function(data, response_text) {
|
||||
if(data.task_id) {
|
||||
// async call, subscribe
|
||||
frappe.socket.subscribe(data.task_id, opts);
|
||||
}
|
||||
else {
|
||||
else if (opts.callback) {
|
||||
// ajax
|
||||
return opts.callback(data, xhr);
|
||||
return opts.callback(data, response_text);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue