Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 6705640

Browse files
committed
remove unnecessary array copy
1 parent 4ce1d61 commit 6705640

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/code/CopyButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const cleanCode = (code: string, annotations: CodeAnnotation[]) => {
1313
const lines = code.split('\n')
1414

1515
// Sort annotations by fromLineNumber in descending order to avoid conflicts
16-
const sortedAnnotations = [...annotations]
16+
const sortedAnnotations = annotations
1717
.filter((a) => 'fromLineNumber' in a)
1818
.sort((a, b) => b.fromLineNumber - a.fromLineNumber)
1919

0 commit comments

Comments
 (0)