Fix jQuery.when applied on array of deferreds
This commit is contained in:
+1
-1
@@ -215,7 +215,7 @@
|
||||
if (!jQuery.isEmptyObject(this.record_deleted)) {
|
||||
deferreds.push(this.model.delete_(this.record_deleted));
|
||||
}
|
||||
return jQuery.when(deferreds);
|
||||
return jQuery.when.apply(jQuery, deferreds);
|
||||
};
|
||||
return array;
|
||||
};
|
||||
|
||||
+2
-2
@@ -268,7 +268,7 @@
|
||||
prms.push(this.remove());
|
||||
}
|
||||
}
|
||||
return jQuery.when(prms);
|
||||
return jQuery.when.apply(jQuery, prms);
|
||||
},
|
||||
save_current: function() {
|
||||
if (!this.current_record) {
|
||||
@@ -358,7 +358,7 @@
|
||||
// TODO set current_record
|
||||
this.current_record = null;
|
||||
// TODO set_cursor
|
||||
jQuery.when(prms).done(function() {
|
||||
jQuery.when.apply(jQuery, prms).done(function() {
|
||||
this.display();
|
||||
result.resolve();
|
||||
}.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user