fix TypeScript NPE type warning

This commit is contained in:
Esben Sparre Andreasen
2021-10-14 21:42:36 +02:00
parent 2a8725d4a8
commit 3847055a30

View File

@@ -1174,7 +1174,7 @@ function shouldCombinePacks(packsInput?: string): boolean {
function combinePacks(packs1: Packs, packs2: Packs): Packs {
const packs = {};
for (const lang of Object.keys(packs1)) {
packs[lang] = packs1[lang].concat(packs2[lang] || []);
packs[lang] = packs1[lang]?.concat(packs2[lang] || []);
}
for (const lang of Object.keys(packs2)) {
if (!packs[lang]) {