From 3528b6c1f89f50146a0049f61cefbc880b3d6ebb Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Sun, 31 May 2020 13:52:26 +0300 Subject: [PATCH] Remove `that` workaround --- build/js/TodoList.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/js/TodoList.js b/build/js/TodoList.js index 12b8df6df..c724a2d51 100644 --- a/build/js/TodoList.js +++ b/build/js/TodoList.js @@ -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)) }) }