Skip to content

Commit

Permalink
Check if maxSize is less than or equal to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Feb 11, 2024
1 parent ff674cb commit 51f3a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lruMemoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export function lruMemoize<Func extends AnyFunction>(
let resultsCount = 0

const cache =
maxSize === 1
maxSize <= 1
? createSingletonCache(comparator)
: createLruCache(maxSize, comparator)

Expand Down

0 comments on commit 51f3a04

Please sign in to comment.