From 999ef1f72ba85d8534805f3b08a9084e792fbf04 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Sat, 25 Dec 2021 00:25:52 +0800 Subject: CI 2 --- features/dataLoader/index.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'features/dataLoader') diff --git a/features/dataLoader/index.js b/features/dataLoader/index.js index 43b0f7a..42d0ec5 100644 --- a/features/dataLoader/index.js +++ b/features/dataLoader/index.js @@ -69,12 +69,16 @@ class DataLoader extends Feature { step(){ //2fps this.stats["Area"] = undefined this.stats["Dungeon"] = undefined - TabList.getNames().forEach(n=>{ - n = ChatLib.removeFormatting(n) - if(n.includes(": ")){ - this.stats[n.split(": ")[0].trim()] = n.split(": ")[1].trim() - } - }) + + if(TabList && TabList.getNames()){ + TabList.getNames().forEach(n=>{ + n = ChatLib.removeFormatting(n) + if(n.includes(": ")){ + this.stats[n.split(": ")[0].trim()] = n.split(": ")[1].trim() + } + }) + } + if(this.stats["Dungeon"]){ this.stats["Area"] = this.stats["Dungeon"] this.isInDungeon = true -- cgit