Skip to content

Commit 640976b

Browse files
committed
don't need shallow copy when we create new object
which is the case using `.map()`
1 parent 6accac6 commit 640976b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/command/render/freeze.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,16 @@ export function freezeExecuteResult(
5757
const innerResult = {
5858
...result,
5959
includes: result.includes ? { ...result.includes } : undefined,
60-
supporting: [...result.supporting],
6160
} as ExecuteResult;
6261
const resolveIncludes = (
6362
name: "include-in-header" | "include-before-body" | "include-after-body",
6463
) => {
6564
if (innerResult.includes) {
6665
if (innerResult.includes[name]) {
67-
innerResult.includes[name] = [
68-
...innerResult.includes[name]!.map((file) =>
69-
// Storing file content using LF line ending
70-
format(Deno.readTextFileSync(file), LF)
71-
),
72-
];
66+
innerResult.includes[name] = innerResult.includes[name]!.map((file) =>
67+
// Storing file content using LF line ending
68+
format(Deno.readTextFileSync(file), LF)
69+
);
7370
}
7471
}
7572
};

0 commit comments

Comments
 (0)