1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

🐛 fix Config

This commit is contained in:
Flam3rboy 2021-07-07 15:21:30 +02:00
parent 8120788dca
commit 137d719ecf

View File

@ -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;