Fix TODO/DONE line-through
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b63eb7948f
commit
a4bff99cee
|
@ -388,9 +388,9 @@ function Editor(holder, input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const todoItem = $(converted).find(':checkbox')
|
const todoItem = $.parseHTML(converted)
|
||||||
if (todoItem.length) {
|
if (todoItem.length && $(todoItem[0]).is(':checkbox')) {
|
||||||
const todo = !todoItem.is(':checked')
|
const todo = !$(todoItem[0]).is(':checked')
|
||||||
element.toggleClass('todo--done', todo === false)
|
element.toggleClass('todo--done', todo === false)
|
||||||
element.toggleClass('todo--todo', todo === true)
|
element.toggleClass('todo--todo', todo === true)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user