From: Frank de Lange Date: Wed, 24 Oct 2018 10:28:25 +0000 (+0200) Subject: Fix #1328 - application-config initialisation in CLI tools (#1343) X-Git-Tag: v1.1.0-rc.1~70 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8684f3c1f6d5b94153fc27dd71ce1659797967ec;p=oweals%2Fpeertube.git Fix #1328 - application-config initialisation in CLI tools (#1343) Test for an empty object in `cli.ts` when no config data is present (i.e. when run on a new install). --- diff --git a/server/tools/cli.ts b/server/tools/cli.ts index 53b20964e..108c44218 100644 --- a/server/tools/cli.ts +++ b/server/tools/cli.ts @@ -23,7 +23,7 @@ async function getSettings () { if (err) { return rej(err) } - return res(data || settings) + return res(Object.keys(data).length === 0 ? settings : data) }) }) }