delete unused variables, delete duplicate declaration #691

Merged
merged 1 commit into from Nov 9, 2012

Projects

None yet

4 participants

@Laboratory
Contributor

No description provided.

@tj tj merged commit 6f411e5 into senchalabs:master Nov 9, 2012

1 check passed

default The Travis build passed
Details
@tj tj commented on the diff Nov 9, 2012
lib/middleware/directory.js
@@ -52,8 +52,8 @@ exports = module.exports = function directory(root, options){
if (!root) throw new Error('directory() root path required');
var hidden = options.hidden
, icons = options.icons
- , filter = options.filter
- , root = normalize(root);
+ , filter = options.filter;
+ root = normalize(root);
@tj
tj Nov 9, 2012 Member

this is the only part i still prefer, i dont care much for the linters

@shesek

Wouldn't it cause handle() to not properly identify it [1] as an error handler?

[1] https://github.com/senchalabs/connect/blob/master/lib/proto.js#L184

Contributor

It did exactly that. Fixed in 8262bd3 it was probably removed because a linter said next was not used within the function's body.

Member
tj replied Nov 13, 2012

yeah my bad, I force-published over this release, I didn't catch this initially

Contributor

Thanks for the info about the force publish. I wasn't sure if I was going to see another dual release or not.

Member
tj replied Nov 13, 2012

good old linters... haha pretending they know things and all

Contributor

Sorry guys, I didn't see description about next and his usage in function...

Member
tj replied Nov 13, 2012

no worries, I should have caught it on merge, someone let me know right away in #express anyway, not much damage done

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