From 4f3c8b940e750a112d84c12a7833e9ffcc70cac9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 4 Nov 2018 23:13:35 +0900 Subject: [PATCH] [API] Fix #3099 --- src/server/api/define.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;