@@ -89,7 +89,9 @@ class DataLoader<K, V, C = K> {
8989 if ( cachedPromise ) {
9090 var cacheHits = batch . cacheHits || ( batch . cacheHits = [ ] ) ;
9191 return new Promise ( resolve => {
92- cacheHits . push ( ( ) => resolve ( cachedPromise ) ) ;
92+ cacheHits . push ( ( ) => {
93+ resolve ( cachedPromise ) ;
94+ } ) ;
9395 } ) ;
9496 }
9597 }
@@ -233,7 +235,9 @@ var enqueuePostPromiseJob =
233235 if ( ! resolvedPromise ) {
234236 resolvedPromise = Promise . resolve ( ) ;
235237 }
236- resolvedPromise . then ( ( ) => process . nextTick ( fn ) ) ;
238+ resolvedPromise . then ( ( ) => {
239+ process . nextTick ( fn ) ;
240+ } ) ;
237241 } :
238242 setImmediate || setTimeout ;
239243
@@ -274,7 +278,9 @@ function getCurrentBatch<K, V>(loader: DataLoader<K, V, any>): Batch<K, V> {
274278 loader . _batch = newBatch ;
275279
276280 // Then schedule a task to dispatch this batch of requests.
277- loader . _batchScheduleFn ( ( ) => dispatchBatch ( loader , newBatch ) ) ;
281+ loader . _batchScheduleFn ( ( ) => {
282+ dispatchBatch ( loader , newBatch ) ;
283+ } ) ;
278284
279285 return newBatch ;
280286}
@@ -339,7 +345,9 @@ function dispatchBatch<K, V>(
339345 batch . callbacks [ i ] . resolve ( value ) ;
340346 }
341347 }
342- } ) . catch ( error = > failedDispatch(loader, batch, error));
348+ } ) . catch ( error = > {
349+ failedDispatch ( loader , batch , error ) ;
350+ } ) ;
343351}
344352
345353// Private: do not cache individual loads if the entire batch dispatch fails,
0 commit comments