Skip to content

Commit

Permalink
refactor: use String.includes()
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Nov 17, 2019
1 parent 0cee89f commit bf427b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/middlewares/pre_compressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = function(app) {

if (!vary) {
res.setHeader('Vary', 'Accept-Encoding');
} else if (!~vary.indexOf('Accept-Encoding')) {
} else if (!vary.includes('Accept-Encoding')) {
res.setHeader('Vary', vary + ', Accept-Encoding');
}

Expand Down

0 comments on commit bf427b2

Please sign in to comment.