Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfdaa68a

Browse files
Update src/task-lists-element.ts
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
1 parent63e5795 commitfdaa68a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎src/task-lists-element.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,8 @@ function position(checkbox: HTMLInputElement): [number, number] {
132132
constlist=taskList(checkbox)
133133
if(!list)thrownewError('.contains-task-list not found')
134134
constitem=checkbox.closest('.task-list-item')
135-
constindex=item
136-
?Array.from(list.children)
137-
.filter(el=>el.classList.contains('task-list-item'))
138-
.indexOf(item)
139-
:-1
135+
constlistItems=Array.from(list.children).filter(el=>el.classList.contains('task-list-item'))
136+
constindex=item ?listItems.indexOf(item) :-1
140137
return[listIndex(list),index]
141138
}
142139

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp