Skip to content

Commit 2d07a6e

Browse files
committed
Test with no memoization
1 parent eeb39a4 commit 2d07a6e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/gitbook-v2/src/lib/data/memoize.ts

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import pMemoize, { type CacheStorage } from 'p-memoize';
1010
* Hopefully one day this can be done directly by 'use cache'.
1111
*/
1212
export function memoize<F extends (...args: any[]) => any>(f: F): F {
13+
if (process.env.NODE_ENV === 'production') {
14+
return f;
15+
}
16+
1317
const getFunctionCache = async () => {
1418
const functionsCache = await getRequestCacheWeakMap();
1519
const cache = functionsCache.get(f);

0 commit comments

Comments
 (0)