From 61a7d1ae1d0aa4564221af9c16ddb122be968dcd Mon Sep 17 00:00:00 2001 From: jongleberry Date: Sun, 25 Feb 2024 14:13:45 -0800 Subject: [PATCH] remove route function typeerror --- index.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/index.js b/index.js index 8f1bf69..306ba44 100644 --- a/index.js +++ b/index.js @@ -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