From fb0d48f7cd47c173b3b72a3c4f99d9470e98ed38 Mon Sep 17 00:00:00 2001 From: Skillet Date: Thu, 9 Mar 2023 16:38:56 -0500 Subject: [PATCH] Update db-log-addOn.js --- squadjsPlugins/db-log-addOn.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/squadjsPlugins/db-log-addOn.js b/squadjsPlugins/db-log-addOn.js index 5102937..f792f75 100644 --- a/squadjsPlugins/db-log-addOn.js +++ b/squadjsPlugins/db-log-addOn.js @@ -87,12 +87,14 @@ export default class DBLogPlayerTime extends DBLog { async mount() { console.log('Mounting db-log'); - if(this.server.currentLayer.gamemode === "Seed"){ - console.log('switching to seeding'); - this.seeding = ServerState.seeding; - } else { - console.log('switching to Live'); - this.seeding = ServerState.live; + if(this.server.currentLayer){ + if(this.server.currentLayer.gamemode === "Seed"){ + console.log('switching to seeding'); + this.seeding = ServerState.seeding; + } else { + console.log('switching to Live'); + this.seeding = ServerState.live; + } } await super.mount(); console.log('finished mounting db-log');