Skip to content

Commit 50ce0df

Browse files
authored
Ensure no repeat categories in ADMX/ADML (microsoft#250143)
Ensure no repeat categories in ADMX/ADML (fix: microsoft#248917)
1 parent c9282b2 commit 50ce0df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/lib/policies.js

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

build/lib/policies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ function renderGP(policies: Policy[], translations: Translations) {
936936
const regKey = product.win32RegValueName;
937937

938938
const versions = [...new Set(policies.map(p => p.minimumVersion)).values()].sort();
939-
const categories = [...new Set(policies.map(p => p.category))];
939+
const categories = [...Object.values(policies.reduce((acc, p) => ({ ...acc, [p.category.name.nlsKey]: p.category }), {}))] as Category[];
940940

941941
return {
942942
admx: renderADMX(regKey, versions, categories, policies),

0 commit comments

Comments
 (0)