diff --git a/@xen-orchestra/async-map/src/index.js b/@xen-orchestra/async-map/src/index.js index f80a6cc4f..b63c391f8 100644 --- a/@xen-orchestra/async-map/src/index.js +++ b/@xen-orchestra/async-map/src/index.js @@ -16,7 +16,7 @@ import map from 'lodash/map' const asyncMap = (collection, iteratee) => { let then if (collection != null && typeof (then = collection.then) === 'function') { - return then.apply(collection, collection => asyncMap(collection, iteratee)) + return then.call(collection, collection => asyncMap(collection, iteratee)) } let errorContainer