Skip to content

Conversation

@N-McA
Copy link

@N-McA N-McA commented Aug 1, 2018

By returning the result of the middleware, promise chaining can be done elsewhere. An example of why this is (very) useful is given by

https://github.com/N-McA/express-ws-async-error-fail-example

Which shows the lack of interoperability that occurs without the suggested change.

@anistark
Copy link

anistark commented Mar 3, 2020

@N-McA On node 12.5.0 I'm getting error TypeError: middleware is not a function.
Adding return didn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants