From 137d719ecfad4529169d96d5f45cac9f263edbe8 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Wed, 7 Jul 2021 15:21:30 +0200 Subject: :bug: fix Config --- src/util/Config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/Config.ts b/src/util/Config.ts index bd8559a8..dfa942e7 100644 --- a/src/util/Config.ts +++ b/src/util/Config.ts @@ -9,7 +9,7 @@ var Config = new MongooseCache(db.collection("config"), [], { onlyEvents: false, export default { init: async function init(defaultOpts: any = DefaultOptions) { await Config.init(); - return this.set(Config.data.merge(defaultOpts)); + return this.set((Config.data || {}).merge(defaultOpts)); }, get: function get() { return Config.data; -- cgit 1.4.1