make sure translation is supplied when propagating enables

This commit is contained in:
louis f 2020-07-31 10:32:42 -04:00
parent bdc076b664
commit afd850fbca
Signed by: louis
GPG Key ID: 44D7E1DE4E23D6F2

View File

@ -141,7 +141,10 @@ class UtageInfo {
for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) { for (const k of Object.keys(this.questTranslationsInner[this.currentTranslation][c])) {
if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) { if (this.questTranslationsInner[this.currentTranslation][c][k].Enabled) {
for (const s of this.quests[c][k].Scenes) { 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; this.sceneTranslationsInner[this.currentTranslation][c][s].Enabled = true;
} }
} }