don't use undefined when your db returns null

This commit is contained in:
monty 2019-12-22 02:15:13 +01:00
parent 1c4fd7148a
commit a965dd70e2

View file

@ -27,7 +27,7 @@ module.exports = {
defaults: DatabaseDefaults, defaults: DatabaseDefaults,
setupServer: async function(ctx) { setupServer: async function(ctx) {
ctx.utils.log.servers.setup(ctx.guild); ctx.utils.log.servers.setup(ctx.guild);
if (Servers.get(ctx.guild.id) === undefined) { if (Servers.get(ctx.guild.id) === null) {
await Servers.set(ctx.guild.id, DatabaseDefaults.server); await Servers.set(ctx.guild.id, DatabaseDefaults.server);
} }
ctx.utils.log.servers.fin(ctx.guild); ctx.utils.log.servers.fin(ctx.guild);