Skip to content

Commit 09bbf33

Browse files
authored
Merge pull request #281 from Autre31415/fix-possible-crash
Fix a crash that can happen with some request objects
2 parents 9808d73 + aa97b36 commit 09bbf33

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- Put your changes here...
66

7+
## 1.0.1
8+
9+
- Fixed a possible crash that can happen with some variety of request objects.
10+
711
## 1.0.0
812

913
- Added a new type of `exceptions` param called `routes`.

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)