Skip to content

Commit d656a14

Browse files
committed
Refactor readPatches to separate removals from the main result object
1 parent 94ee9a9 commit d656a14

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/build/patches.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,9 @@ export default async function readPatches(
436436

437437
const parsedContents = await Promise.all(fileUrls.map(readPatch));
438438
const res = parsedContents.reduce((acc, current) => merge(acc, current), {});
439+
const { removals, ...withoutRemovals } = res;
439440
if (folder == "removals") {
440-
return removeNamesDeep(res.removals);
441+
return removeNamesDeep(removals);
441442
}
442-
return res;
443+
return withoutRemovals;
443444
}

0 commit comments

Comments
 (0)