http-proxy-middleware icon indicating copy to clipboard operation
http-proxy-middleware copied to clipboard

Fix exception when route doesn't match configured filter

Open TomaszG opened this issue 2 years ago • 0 comments

Description

Check if the next function is defined/provided before executing it

Motivation and Context

Fixes #870

How has this been tested?

Verified whether the error is not thrown when middleware receives a route that doesn't match the filter.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.

TomaszG avatar Jan 31 '23 08:01 TomaszG