diff options
author | Frank de Lange <github-f@unternet.org> | 2018-10-24 12:28:25 +0200 |
---|---|---|
committer | Rigel Kent <par@rigelk.eu> | 2018-10-24 12:28:25 +0200 |
commit | 8684f3c1f6d5b94153fc27dd71ce1659797967ec (patch) | |
tree | 1482c0c93a058be62e8c5ed701a44950fda9f44b /server/tools/cli.ts | |
parent | e730aef76abe02485f417ecef99da2c3b760edc4 (diff) | |
download | PeerTube-8684f3c1f6d5b94153fc27dd71ce1659797967ec.tar.gz PeerTube-8684f3c1f6d5b94153fc27dd71ce1659797967ec.tar.zst PeerTube-8684f3c1f6d5b94153fc27dd71ce1659797967ec.zip |
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).
Diffstat (limited to 'server/tools/cli.ts')
-rw-r--r-- | server/tools/cli.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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 () { | |||
23 | if (err) { | 23 | if (err) { |
24 | return rej(err) | 24 | return rej(err) |
25 | } | 25 | } |
26 | return res(data || settings) | 26 | return res(Object.keys(data).length === 0 ? settings : data) |
27 | }) | 27 | }) |
28 | }) | 28 | }) |
29 | } | 29 | } |