Skip to content

Commit 549d498

Browse files
henrymercerCopilot
andcommitted
Simplify per-language platform eligibility checks
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent ed3a24c commit 549d498

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

lib/entry-points.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/per-language-bundles.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,10 @@ export async function getPerLanguageBundleLanguage(
117117
}
118118
}
119119

120-
const supportedLanguages =
121-
platform === undefined
122-
? undefined
123-
: PER_LANGUAGE_BUNDLE_LANGUAGES[platform];
124-
if (!supportedLanguages?.has(language)) {
120+
if (
121+
platform === undefined ||
122+
!PER_LANGUAGE_BUNDLE_LANGUAGES[platform].has(language)
123+
) {
125124
return explain(
126125
`no per-language bundle is published for ${language} on ${platform ?? "an unknown platform"}`,
127126
);

0 commit comments

Comments
 (0)