Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

Commit

Permalink
Fix bug in disabling logic
Browse files Browse the repository at this point in the history
  • Loading branch information
thepont committed Sep 19, 2017
1 parent 10ce50f commit 0036fc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ module.exports = function(done, app, options) {
}

app.use(flash());
if(typeof multer.compression === 'undefined' || options.multer.disable !== true){
if(typeof options.multer !== 'undefined' && options.multer.disable !== true){
var multer = require('multer');
app.use(multer(middlewareOptions('multer', options)));
}
if(typeof options.compression === 'undefined' || options.compression.disable !== true){
if(typeof options.compression !== 'undefined' && options.compression.disable !== true){
app.use(compression(middlewareOptions('compression', options)));
}
app.use(timeout(middlewareOptions('timeout', options).ms));
Expand Down

0 comments on commit 0036fc5

Please sign in to comment.