summaryrefslogtreecommitdiff
path: root/app/services/task_list_toggle_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/task_list_toggle_service.rb')
-rw-r--r--app/services/task_list_toggle_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/task_list_toggle_service.rb b/app/services/task_list_toggle_service.rb
index 32cfa198ce8..082fa1447fc 100644
--- a/app/services/task_list_toggle_service.rb
+++ b/app/services/task_list_toggle_service.rb
@@ -38,7 +38,7 @@ class TaskListToggleService
return unless markdown_task.chomp == line_source
return unless source_checkbox = Taskable::ITEM_PATTERN.match(markdown_task)
- currently_checked = TaskList::Item.new(source_checkbox[1]).complete?
+ currently_checked = TaskList::Item.new(source_checkbox[2]).complete?
# Check `toggle_as_checked` to make sure we don't accidentally replace
# any `[ ]` or `[x]` in the middle of the text