Skip to content

Commit ddc87b4

Browse files
committed
[perf] removePandocTo - no cloneDeep
1 parent 2304786 commit ddc87b4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/command/render/flags.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ export function removePandocToArg(args: string[]) {
471471
}
472472

473473
export function removePandocTo(renderOptions: RenderOptions) {
474-
renderOptions = ld.cloneDeep(renderOptions);
474+
renderOptions = {
475+
...renderOptions,
476+
flags: {
477+
...(renderOptions.flags || {}),
478+
},
479+
} as RenderOptions;
475480
delete renderOptions.flags?.to;
476481
if (renderOptions.pandocArgs) {
477482
renderOptions.pandocArgs = removePandocToArg(renderOptions.pandocArgs);

0 commit comments

Comments
 (0)