summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/util/Config.ts2
1 files changed, 1 insertions, 1 deletions
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 <DefaultOptions>Config.data;