Skip to content

Commit

Permalink
remove route function typeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanong committed Feb 25, 2024
1 parent 377c0c4 commit 61a7d1a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ function create(method) {
const re = pathToRegexp(path, keys, opts);
debug('%s %s -> %s', method || 'ALL', path, re);

if (typeof fn !== 'function') {
throw new TypeError('Route handler must be a function');
}

const createRoute = function(routeFunc) {
return function (ctx, next){
// method
Expand Down

0 comments on commit 61a7d1a

Please sign in to comment.