summaryrefslogtreecommitdiff
path: root/ext/http
diff options
context:
space:
mode:
Diffstat (limited to 'ext/http')
-rw-r--r--ext/http/00_serve.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/http/00_serve.ts b/ext/http/00_serve.ts
index b12a87390..de94779dc 100644
--- a/ext/http/00_serve.ts
+++ b/ext/http/00_serve.ts
@@ -793,9 +793,9 @@ internals.serveHttpOnConnection = serveHttpOnConnection;
function registerDeclarativeServer(exports) {
if (ObjectHasOwn(exports, "fetch")) {
- if (typeof exports.fetch !== "function" || exports.fetch.length !== 1) {
+ if (typeof exports.fetch !== "function") {
throw new TypeError(
- "Invalid type for fetch: must be a function with a single parameter",
+ "Invalid type for fetch: must be a function with a single or no parameter",
);
}
return ({ servePort, serveHost }) => {