Skip to content

Commit 040960e

Browse files
author
Martin Martinez Rivera
committed
Removed err check because it is not needed.
1 parent e55202b commit 040960e

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

‎lib/acl.js‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,7 @@ function allow(mode, req, res, next) {
509509
var reqPath = res && res.locals && res.locals.path ? res.locals.path : req.path;
510510
var acl = reqToACL(req);
511511
acl.allow(mode, reqPath, function(err) {
512-
if (err) {
513-
next(err);
514-
} else {
515-
next();
516-
}
512+
return next(err);
517513
});
518514
}
519515

@@ -543,11 +539,7 @@ exports.allowAppendThenWriteHandler = function(req, res, next) {
543539
}
544540
// Append failed, maybe user can write
545541
allow("Write", req, res, function(err) {
546-
if (err) {
547-
return next(err);
548-
} else {
549-
return next();
550-
}
542+
return next(err);
551543
});
552544
});
553545

0 commit comments

Comments
 (0)