From 7d2d25b8c7e5f0062fcb416e3e1e089f9f32d1f2 Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 31 Jul 2020 10:32:42 -0400 Subject: [PATCH] make sure translation is supplied when propagating enables --- Js/UtageParse.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Js/UtageParse.js b/Js/UtageParse.js index 69387e7..4cd08c8 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -141,7 +141,11 @@ class UtageInfo { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { for (const s of this.quests[c][k].Scenes) { - if (c in this.sceneTranslationsInner[this.currentTranslation] && s in this.sceneTranslationsInner[this.currentTranslation][c]) { + // only propagate if exists in translation file (THANKS GLOBAL) and translated name is supplied + if (c in this.sceneTranslationsInner[this.currentTranslation] + && s in this.sceneTranslationsInner[this.currentTranslation][c] + && this.sceneTranslationsInner[this.currentTranslation][c][s].Name != "") { + console.log(this.sceneTranslationsInner[this.currentTranslation][c][s]); this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; } }