diff --git a/scripts/downloadNsiLogos.ts b/scripts/downloadNsiLogos.ts index 46f9f0c28a..06e73ca9be 100644 --- a/scripts/downloadNsiLogos.ts +++ b/scripts/downloadNsiLogos.ts @@ -141,21 +141,21 @@ class DownloadNsiLogos extends Script { })) console.log("Checking for shadow-mappings...") - for (let i = mappings.length - 1; i >= 0 ; i--) { + for (let i = mappings.length - 1; i >= 0; i--) { const condition = TagUtils.Tag(mappings[i].if) - if(i % 100 === 0){ - console.log("Checking for shadow-mappings...",i,"/",mappings.length ) + if (i % 100 === 0) { + console.log("Checking for shadow-mappings...", i, "/", mappings.length) } - const shadowsSomething = mappings.some((m,j) => { - if(i===j ){ + const shadowsSomething = mappings.some((m, j) => { + if (i === j) { return false } return condition.shadows(TagUtils.Tag(m.if)) }) // If this one matches, the other one will match as well // We can thus remove this one in favour of the other one - if(shadowsSomething){ + if (shadowsSomething) { mappings.splice(i, 1) } } @@ -178,7 +178,7 @@ class DownloadNsiLogos extends Script { ], filter: [ { - "#":"ignore-possible-duplicate", + "#": "ignore-possible-duplicate", id: type, strict: true, options: [{ question: type }, ...filterOptions], @@ -196,9 +196,11 @@ class DownloadNsiLogos extends Script { async main(): Promise { const nsi = await NameSuggestionIndex.getNsiIndex() const types = ["brand", "operator"] + for (const type of types) { + await this.downloadFor(type) + } for (const type of types) { await this.generateRendering(type) - // await this.downloadFor(type) } } diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index 48ad8af3f1..f515ae22cf 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -839,6 +839,9 @@ class LayerOverviewUtils extends Script { const themeInfo = themeFiles[i] const themePath = themeInfo.path let themeFile = themeInfo.parsed + if(!themeFile){ + throw "Got an empty file for"+themeInfo.path + } if (whitelist.size > 0 && !whitelist.has(themeFile.id)) { continue }