From 258249e734068b907133a82d9e65da6b660acfdf Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Fri, 20 Jan 2023 15:25:20 +0100 Subject: [PATCH] Update src/runtime/cache.ts --- src/runtime/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/cache.ts b/src/runtime/cache.ts index f5197cb1d7..90ea8e4b3f 100644 --- a/src/runtime/cache.ts +++ b/src/runtime/cache.ts @@ -78,7 +78,7 @@ export function defineCachedFunction( const _resolve = async () => { if (!pending[key]) { - if (entry.value && (opts.staleMaxAge || 0) >= 0) { + if (entry.value !== undefined && (opts.staleMaxAge || 0) >= 0) { // Remove cached entry to prevent using expired cache on concurrent requests entry.value = undefined; entry.integrity = undefined;