@@ -89,7 +89,9 @@ class DataLoader<K, V, C = K> {
89
89
if ( cachedPromise ) {
90
90
var cacheHits = batch . cacheHits || ( batch . cacheHits = [ ] ) ;
91
91
return new Promise ( resolve => {
92
- cacheHits . push ( ( ) => resolve ( cachedPromise ) ) ;
92
+ cacheHits . push ( ( ) => {
93
+ resolve ( cachedPromise ) ;
94
+ } ) ;
93
95
} ) ;
94
96
}
95
97
}
@@ -233,7 +235,9 @@ var enqueuePostPromiseJob =
233
235
if ( ! resolvedPromise ) {
234
236
resolvedPromise = Promise . resolve ( ) ;
235
237
}
236
- resolvedPromise . then ( ( ) => process . nextTick ( fn ) ) ;
238
+ resolvedPromise . then ( ( ) => {
239
+ process . nextTick ( fn ) ;
240
+ } ) ;
237
241
} :
238
242
setImmediate || setTimeout ;
239
243
@@ -274,7 +278,9 @@ function getCurrentBatch<K, V>(loader: DataLoader<K, V, any>): Batch<K, V> {
274
278
loader . _batch = newBatch ;
275
279
276
280
// Then schedule a task to dispatch this batch of requests.
277
- loader . _batchScheduleFn ( ( ) => dispatchBatch ( loader , newBatch ) ) ;
281
+ loader . _batchScheduleFn ( ( ) => {
282
+ dispatchBatch ( loader , newBatch ) ;
283
+ } ) ;
278
284
279
285
return newBatch ;
280
286
}
@@ -339,7 +345,9 @@ function dispatchBatch<K, V>(
339
345
batch . callbacks [ i ] . resolve ( value ) ;
340
346
}
341
347
}
342
- } ) . catch ( error = > failedDispatch(loader, batch, error));
348
+ } ) . catch ( error = > {
349
+ failedDispatch ( loader , batch , error ) ;
350
+ } ) ;
343
351
}
344
352
345
353
// Private: do not cache individual loads if the entire batch dispatch fails,
0 commit comments