[ADD] Add console warning on Deferred.pipe() usage

bzr revid: fme@openerp.com-20121030140529-nzhxwb84vf2a553c
This commit is contained in:
Fabien Meghazi
2012-10-30 15:05:29 +01:00
parent 1210ad9321
commit eb1c4d0f93
+5 -1
View File
@@ -1149,7 +1149,11 @@ jQuery.extend({
deferred = {};
// Keep pipe for back-compat
promise.pipe = promise.then;
//promise.pipe = promise.then;
promise.pipe = function() {
console.error("$.Deferred().pipe() is deprecated. Use .then() instead.");
return promise.then.apply(this, arguments);
};
// Add list-specific methods
jQuery.each( tuples, function( i, tuple ) {