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

next function in single function case #77

Open
fanatid opened this issue Dec 11, 2018 · 5 comments
Open

next function in single function case #77

fanatid opened this issue Dec 11, 2018 · 5 comments
Labels
Milestone

Comments

@fanatid
Copy link

fanatid commented Dec 11, 2018

I'm not sure, was such issue raised before or not, I tried search, but did not found.

Why next function is not provided if route have only 1 function?

if (len === i && num === 1) return fns[0](req, res);

Is not right code will be:

if (len === i && num === 1) return fns[0](req, res, err => err && this.onError(err, req, res, next));
@lukeed
Copy link
Owner

lukeed commented Dec 11, 2018

Hey, sure, this was intentional (initially). Every endpoint should include its own termination.

That said, this has already been fixed in the next version of Polka (not yet released) because I realized the inconsistency here. I'll leave this open for tracking purposes while I get 1.0 together.

Thanks!

@lukeed lukeed added the has fix label Dec 11, 2018
@lukeed lukeed added this to the 1.0.0 milestone Dec 11, 2018
@fanatid
Copy link
Author

fanatid commented Dec 11, 2018

Thanks for quick reply, any ETA when 1.0 will be released? Also, can you point where I can find code of 1.0?

@lukeed
Copy link
Owner

lukeed commented Dec 11, 2018

No problem~ 1.0 will be released early January. I'll be polishing it up over the holidays. The code is not public yet as it exists/has been developed within personal projects

@leeoniya
Copy link

leeoniya commented Mar 1, 2019

@lukeed any updates on 1.0?

@lukeed
Copy link
Owner

lukeed commented Mar 1, 2019

The core for 1.0 is complete. I'm now just working on supporting packages / middleware. The biggest of them, for illustration, is attaching view engine(s) to your application on command. Express has it built-in, so this will be one of the few remaining differences.

I hope to do a very short next release cycle once all these decisions have been made. Since things are changing a lot on an organizational level (package re-arrangement, names, etc) I haven't been keen on publishing new versions/tags since it'd just add confusion.

lukeed added a commit that referenced this issue Mar 10, 2019
- very unlikely in real-world scenarios
- Closes #77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants