Skip to content

Commit

Permalink
Changing route sets to be Sets
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Apr 26, 2018
1 parent 4c38307 commit dca80a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/woodland.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class Woodland {

return valid;
}), route => {
middleware = middleware.concat(map.get(route));
middleware = middleware.concat(Array.from(map.get(route)));
});
}
});
Expand Down Expand Up @@ -419,11 +419,11 @@ class Woodland {
mmethod = this.middleware.get(method);

if (mmethod.has(rpath) === false) {
mmethod.set(rpath, []);
mmethod.set(rpath, new Set());
}

fn.hash = this.hash(fn.toString());
mmethod.get(rpath).push(fn);
mmethod.get(rpath).add(fn);

return this;
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woodland",
"version": "5.0.4",
"version": "5.0.5",
"description": "Lightweight HTTP/HTTPS/HTTP2 router with automatic `Allow` & `CORS` headers",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit dca80a0

Please sign in to comment.