From b91d66f5b8f43920f3d155a5875d13210325ba06 Mon Sep 17 00:00:00 2001 From: Skillet Date: Sat, 11 Mar 2023 17:14:08 -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 f792f75..aef6d6d 100644 --- a/squadjsPlugins/db-log-addOn.js +++ b/squadjsPlugins/db-log-addOn.js @@ -217,12 +217,14 @@ export default class DBLogPlayerTime extends DBLog { console.log(info); const curDateTime = info.time; - if(info.layer.gamemode === 'Seed'){ - console.log('switching to seeding'); - await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.seeding); - } else { - console.log('switching to Live'); - await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.live); + if(info.layer){ + if(info.layer.gamemode === 'Seed'){ + console.log('switching to seeding'); + await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.seeding); + } else { + console.log('switching to Live'); + await this.updateCurrentTimeState(curDateTime, this.seeding, ServerState.live); + } } }