Skip to content

Commit

Permalink
Use getHeaders or _headers
Browse files Browse the repository at this point in the history
  • Loading branch information
emeitch committed Jun 3, 2019
1 parent 6dd2d56 commit 87bee4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/browser-sync-client/index.js
Expand Up @@ -92,7 +92,8 @@ function init(options, requestBody, type) {
* Set the appropriate headers for caching
*/
setHeaders(res, output);
if (isConditionalGet(req) && fresh(req.headers, res._headers)) {
var resHeaders = res.getHeaders ? res.getHeaders() : res._headers;
if (isConditionalGet(req) && fresh(req.headers, resHeaders)) {
return notModified(res);
}

Expand Down

0 comments on commit 87bee4b

Please sign in to comment.