fix(xo-server): work around minor Babel issue

This commit is contained in:
Julien Fontanet 2018-03-07 21:11:20 +01:00
parent b1986dc275
commit 10ab4f2d79

View File

@ -155,10 +155,10 @@ const unboxIds = (pattern?: SimpleIdPattern): string[] => {
} }
// similar to Promise.all() but do not gather results // similar to Promise.all() but do not gather results
const waitAll = async <T>( async function waitAll<T> (
promises: Promise<T>[], promises: Promise<T>[],
onRejection: Function onRejection: Function
): Promise<void> => { ): Promise<void> {
promises = promises.map(promise => { promises = promises.map(promise => {
promise = promise.catch(onRejection) promise = promise.catch(onRejection)
promise.catch(noop) // prevent unhandled rejection warning promise.catch(noop) // prevent unhandled rejection warning