Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not artificially restrict the set of supported languages #779

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix TypeScript NPE type warning
  • Loading branch information
esbena committed Oct 25, 2021
commit 3847055a30388dbb66d5cfbdee60c00de1df8e3e
2 changes: 1 addition & 1 deletion src/config-utils.ts
Original file line number Diff line number Diff line change
@@ -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] || []);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is what we want to do in order to ensure we never set packs[lang] to undefined.

Suggested change
packs[lang] = packs1[lang]?.concat(packs2[lang] || []);
packs[lang] = (packs1[lang] || []).concat(packs2[lang] || []);

}
for (const lang of Object.keys(packs2)) {
if (!packs[lang]) {