From afd850fbcaa64f8a38f69a338a98645e79bb6940 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Js/UtageParse.js b/Js/UtageParse.js index 69387e7..a33cde2 100644 --- a/Js/UtageParse.js +++ b/Js/UtageParse.js @@ -141,7 +141,10 @@ 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 != "") { this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true; } }