Fix jQuery.when applied on array of deferreds

This commit is contained in:
Cédric Krier
2013-04-08 19:23:56 +02:00
parent 8554508da0
commit f3bcf89f4b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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));