Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve issue when root middleware aren't used at all #3

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

ariesclark
Copy link
Contributor

No description provided.

@ridafkih
Copy link
Owner

ridafkih commented Jun 24, 2022

"issue" is vague, could you please explain the issue and the situation it occurs in?

Thanks.

@ariesclark
Copy link
Contributor Author

ariesclark commented Jun 24, 2022

Could you please explain the issue and the case it occurs in?

When you provide any middleware to the router function, previously it just threw an error, since you're not binding app.use to app, so I changed that, and moved the middleware above the routers cause if they're called afterwards you can't do anything.

router({
  // this errors without this fix.
  middleware: [/* any middleware function */]
});

@ridafkih
Copy link
Owner

Great, thanks!

@ridafkih ridafkih merged commit 2b00f55 into ridafkih:main Jun 24, 2022
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