Skip to content

Commit

Permalink
Removing an unneeded conditional due to visible > 0 condition in th…
Browse files Browse the repository at this point in the history
…e `allowed()` method of the router
  • Loading branch information
avoidwork committed Oct 24, 2019
1 parent 2605ba9 commit 2c359e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions lib/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ function payload (req, res, next) {
function keymaster (req, res) {
// No authentication, or it's already happened
if (req.protect === false || req.protectAsync === false || (req.session !== void 0 && req.isAuthenticated())) { // eslint-disable-line no-extra-parens
if (typeof req.last === "function") {
req.last(req, res);
} else {
res.error(500);
}
req.last(req, res);
} else {
res.error(401);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an HTTP/HTTP2 REST API framework",
"version": "13.0.2",
"version": "13.0.3",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down

0 comments on commit 2c359e1

Please sign in to comment.