From 20fcefb5f4452a4cfedb6812d9bbf75a8a9f3fd6 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 38f20c088..de9a8caf9 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;