Skip to content

Commit 4ed8dee

Browse files
committed
fix lint
1 parent a693de1 commit 4ed8dee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/dataloader-es/src/dataLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function resolveCacheHits<K, V>(batch: Batch<K, V>) {
251251

252252
// Private: given the DataLoader's options, produce a valid max batch size.
253253
function getValidMaxBatchSize<K, V, C>(options?: Options<K, V, C>): number {
254-
const shouldBatch = !options || options.batch !== false;
254+
const shouldBatch = options?.batch !== false;
255255
if (!shouldBatch) {
256256
return 1;
257257
}
@@ -289,7 +289,7 @@ function getValidCacheKeyFn<K, C>(
289289
function getValidCacheMap<K, V, C>(
290290
options?: Options<K, V, C>,
291291
): CacheMap<C, Promise<V>> | null {
292-
const shouldCache = !options || options.cache !== false;
292+
const shouldCache = options?.cache !== false;
293293
if (!shouldCache) {
294294
return null;
295295
}

0 commit comments

Comments
 (0)