diff --git a/src/server/api/define.ts b/src/server/api/define.ts index 38f20c0889..de9a8caf96 100644 --- a/src/server/api/define.ts +++ b/src/server/api/define.ts @@ -40,7 +40,7 @@ function getParams(defs: T, params: any): [Params, E (err as any).param = k; return true; } else { - if (v === undefined && def.default) { + if (v === undefined && def.hasOwnProperty('default')) { x[k] = def.default; } else { x[k] = v;