[REF] web: remove legacy rejectAfter

In our continued effort to remove legacy code, this commit remove the
the legacy rejectAfter util as it's not used anymore.

Part-of task-id 3439226

Part-of: odoo/odoo#132559
This commit is contained in:
Jorge Pinna Puissant
2023-08-23 11:12:26 +02:00
parent 497a56b36c
commit 0513be3d7b
@@ -152,20 +152,6 @@ const concurrency = {
}
}
}),
/**
* Rejects a promise as soon as a reference promise is either resolved or
* rejected
*
* @param {Promise} [target_def] the promise to potentially reject
* @param {Promise} [reference_def] the reference target
* @returns {Promise}
*/
rejectAfter: function (target_def, reference_def) {
return new Promise(function (resolve, reject) {
target_def.then(resolve).guardedCatch(reject);
reference_def.then(reject).guardedCatch(reject);
});
}
};
export default concurrency;