Skip to content

Commit

Permalink
fix(polkompress): always call writeHead step
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed May 27, 2021
1 parent 522b124 commit 23bee83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/wmr/src/lib/polkompress.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function compression({ threshold = 1024, level = -1, brotli = fal
listeners.forEach(p => on.apply(res, p));
}

if (pendingStatus) writeHead.call(res, pendingStatus);
writeHead.call(res, pendingStatus || res.statusCode);
}

const { end, write, on, writeHead } = res;
Expand Down

0 comments on commit 23bee83

Please sign in to comment.