Skip to content

Commit

Permalink
Fix typo: Update index.js
Browse files Browse the repository at this point in the history
Fix typo in condition check
  • Loading branch information
sazk07 authored Nov 12, 2024
1 parent 9e3dbb4 commit c6f399c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/params/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.param(['to', 'from'], function(req, res, next, num, name){
// Load user by id

app.param('user', function(req, res, next, id){
if (req.user = users[id]) {
if (req.user === users[id]) {
next();
} else {
next(createError(404, 'failed to find user'));
Expand Down

0 comments on commit c6f399c

Please sign in to comment.