Skip to content

Commit 790f3ef

Browse files
committed
-
1 parent 117e76b commit 790f3ef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ async function emitDom() {
8989

9090
const overriddenItems = await readInputJSON("overridingTypes.jsonc");
9191
const addedItems = await readInputJSON("addedTypes.jsonc");
92-
const patches = await readPatches("patches");
93-
const removals = await readPatches("removals");
92+
const patches = await readPatches();
93+
const removals = await readPatches(true);
9494
const comments = await readInputJSON("comments.json");
9595
const documentationFromMDN = await generateDescriptions();
9696
const removedItems = await readInputJSON("removedTypes.jsonc");

src/build/patches.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,15 @@ function removeNamesDeep(obj: unknown): unknown {
428428
* Read, parse, and merge all KDL files under the input folder.
429429
*/
430430
export default async function readPatches(
431-
folder: "patches" | "removals",
431+
isRemovals?: boolean,
432432
): Promise<any> {
433433
const patchDirectory = new URL("../../inputfiles/patches/", import.meta.url);
434434
const fileUrls = await getAllFileURLs(patchDirectory);
435435

436436
const parsedContents = await Promise.all(fileUrls.map(readPatch));
437437
const res = parsedContents.reduce((acc, current) => merge(acc, current), {});
438438
const { removals, ...withoutRemovals } = res;
439-
if (folder == "removals") {
439+
if (isRemovals) {
440440
return removeNamesDeep(removals);
441441
}
442442
return withoutRemovals;

0 commit comments

Comments
 (0)