Skip to content

Commit

Permalink
Fix possible undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
rjyo committed Dec 8, 2021
1 parent d669d38 commit 6e31ac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function serveCache(
const payload = { body: null, headers: null }
if (!rv.stop) {
payload.body = await cache.get('body:' + key)
payload.headers = JSON.parse((await cache.get('header:' + key)).toString())
payload.headers = JSON.parse((await cache.get('header:' + key))?.toString())
}
send(payload, res)

Expand Down

0 comments on commit 6e31ac7

Please sign in to comment.