Remove `that` workaround

pull/2751/head
XhmikosR 2020-05-31 13:52:26 +03:00
parent c8feb99dc2
commit 3528b6c1f8
1 changed files with 1 additions and 2 deletions

View File

@ -68,10 +68,9 @@ const TodoList = ($ => {
// Private
_init() {
const that = this
$(Selector.DATA_TOGGLE).find('input:checkbox:checked').parents('li').toggleClass(ClassName.TODO_LIST_DONE)
$(Selector.DATA_TOGGLE).on('change', 'input:checkbox', event => {
that.toggle($(event.target))
this.toggle($(event.target))
})
}