Skip to content

Commit e923a11

Browse files
authored
Merge pull request #451 from isitannarli/master
node 20 bugfix
2 parents 7803684 + c1b686c commit e923a11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "puzzle-warden",
3-
"version": "1.8.5",
3+
"version": "1.8.6",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"license": "MIT",

src/cache-then-network.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CacheThenNetwork extends Streamer {
2525

2626
async onResponse(chunk: CacheDecoratedResponse, next: NextHandler): Promise<void> {
2727
if (!chunk.cacheHit && !chunk.error && chunk.response) {
28-
if (chunk.response.headers["set-cookie"] && !this.cacheWithCookie) {
28+
if (chunk.response.headers?.["set-cookie"] && !this.cacheWithCookie) {
2929
console.warn('Detected dangerous response with set-cookie header, not caching', chunk.key);
3030
} else {
3131
await this.storage.set(chunk.key, {

0 commit comments

Comments
 (0)