From d4a630902d8d250b67fcd0ce2b49240786b40368 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 4 Apr 2020 08:46:54 +0900 Subject: refactor: Use === --- src/server/api/api-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server/api/api-handler.ts') diff --git a/src/server/api/api-handler.ts b/src/server/api/api-handler.ts index b147bca143..7fbc200fc0 100644 --- a/src/server/api/api-handler.ts +++ b/src/server/api/api-handler.ts @@ -34,7 +34,7 @@ export default (endpoint: IEndpoint, ctx: Koa.Context) => new Promise((res) => { call(endpoint.name, user, app, body, (ctx as any).file).then((res: any) => { reply(res); }).catch((e: ApiError) => { - reply(e.httpStatusCode ? e.httpStatusCode : e.kind == 'client' ? 400 : 500, e); + reply(e.httpStatusCode ? e.httpStatusCode : e.kind === 'client' ? 400 : 500, e); }); }).catch(() => { reply(403, new ApiError({ -- cgit v1.2.3-freya