Merge pull request #574 from ZmagoD/zd_SCI_1194_v2

prevent to get nil as a param in checklist_item_annotation method [fi…
This commit is contained in:
Zmago Devetak 2017-05-03 10:56:21 +02:00 committed by GitHub
commit cc6c2942c2

View file

@ -74,8 +74,8 @@ module StepsActions
e.items.each do |ci|
old_list = old_checklists.select { |i| i.id == e.id }.first
old_item = old_list.items.select { |i| i.id == ci.id }.first if old_list
checklist_item_annotation(step, ci, old_item.text)
text = old_item ? old_item.text : ''
checklist_item_annotation(step, ci, text)
end
end
end