Skip to content

Commit d16c77a

Browse files
committed
Fix a crash that can happen with some request objects
1 parent 9808d73 commit d16c77a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

express-html-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = (app, params) => {
4646

4747
function reqExemptFromValidation (req, res) {
4848
// check for route exemptions
49-
if (wildcardMatch(req.route.path, routeException)) return true
49+
if (wildcardMatch(req.route?.path, routeException)) return true
5050

5151
// check for model exemptions
5252
if (resModel) {

0 commit comments

Comments
 (0)