Skip to content

Commit b70701f

Browse files
committed
chore: fix changelog generator undefined whitelabel vendor/description
1 parent 6d30fa1 commit b70701f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/generateChangelog.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ if (fs.existsSync(commitUserFile)) {
5959
}
6060

6161
const definitions = definitionIndex.default.map((d) => zhc.prepareDefinition(d));
62-
const whiteLabels = definitions.filter((d) => d.whiteLabel).flatMap((d) => d.whiteLabel);
62+
const whiteLabels = definitions
63+
.filter((d) => d.whiteLabel)
64+
.flatMap((d) =>
65+
d.whiteLabel.map((wl) => {
66+
return {model: wl.model, vendor: wl.vendor ?? d.vendor, description: wl.description ?? d.description};
67+
}),
68+
);
6369
const capitalizeFirstChar = (str) => str.charAt(0).toUpperCase() + str.slice(1);
6470

6571
for (const changelog of changelogs) {

0 commit comments

Comments
 (0)