Skip to content

Commit

Permalink
Fix unnecessary cloning array
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Aug 5, 2024
1 parent ae81fc1 commit 39dd863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ckeditor5-list/src/todolist/todolistediting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ function todoListItemUpcastConverter(): GetCallback<UpcastElementEvent> {
// that has checked state set to true. In such cases, we need to ensure that all items of the same list have the same checked state.
// See more: https://github.com/ckeditor/ckeditor5/issues/15602
for ( const [ , items ] of groupedItems.entries() ) {
if ( [ ...items ].some( item => item.getAttribute( 'todoListChecked' ) ) ) {
if ( items.some( item => item.getAttribute( 'todoListChecked' ) ) ) {
for ( const item of items ) {
writer.setAttribute( 'todoListChecked', true, item );
}
Expand Down

0 comments on commit 39dd863

Please sign in to comment.