8000 fix(cache): validate `entry.value` to have value for cached handlers · nitrojs/nitro@8455938 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 8455938

Browse files
committed
fix(cache): validate entry.value to have value for cached handlers
1 parent f4e3333 commit 8455938

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/cache.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ export function defineCachedEventHandler<
246246
return [_hashedPath, ..._headers].join(":");
247247
},
248248
validate: (entry) => {
249+
if (!entry.value) {
250+
return false;
251+
}
249252
if (entry.value.code >= 400) {
250253
return false;
251254
}

0 commit comments

Comments
 (0)
0