From 7225b275e8625a2fb2ef20c6408bba8373ffacbc Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Wed, 29 Jun 2016 09:38:32 +0200 Subject: [PATCH] Fix usage of apply function issue5666 review22121003 --- src/model.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model.js b/src/model.js index 6b4a4a1b5d..a615809394 100644 --- a/src/model.js +++ b/src/model.js @@ -794,7 +794,7 @@ } } this.set_default(values); - jQuery.when.apply(promises).then(function() { + jQuery.when.apply(jQuery, promises).then(function() { dfd.resolve(values); }); }.bind(this)); @@ -835,7 +835,7 @@ this._loaded[fname] = true; fieldnames.push(fname); } - return jQuery.when.apply(promises).then(function() { + return jQuery.when.apply(jQuery, promises).then(function() { return this.on_change(fieldnames).then(function() { return this.on_change_with(fieldnames).then(function() { var callback = function() { @@ -1024,7 +1024,7 @@ } promises.push(this.do_autocomplete(fname)); } - return jQuery.when.apply(promises); + return jQuery.when.apply(jQuery, promises); }, do_autocomplete: function(fieldname) { this.autocompletion[fieldname] = []; @@ -1838,7 +1838,7 @@ } }); } - return jQuery.when.apply(promises); + return jQuery.when.apply(jQuery, promises); }; return prm.then(set_value); },