From 2e39106c4bb2d9a7d1a50a116b4e88402e6ba601 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Sat, 6 Oct 2018 17:19:41 +0900 Subject: [PATCH] better config handling --- src/server/api/endpoints/users/recommendation.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/server/api/endpoints/users/recommendation.ts b/src/server/api/endpoints/users/recommendation.ts index 4f90335be..95d75ac48 100644 --- a/src/server/api/endpoints/users/recommendation.ts +++ b/src/server/api/endpoints/users/recommendation.ts @@ -17,9 +17,7 @@ export const meta = { }; export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => { - var external = config.user_recommendation.external - - if (external) { + if (config.user_recommendation && config.user_recommendation.external) { var userName = me.username var hostName = config.hostname var limit = params.limit