mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 14:41:53 +08:00
prevent to get nil as a param in checklist_item_annotation method [fixes SCI-1194]
This commit is contained in:
parent
b930af0033
commit
0456393317
1 changed files with 3 additions and 2 deletions
|
@ -74,8 +74,9 @@ 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.text if old_item
|
||||
text ||= ''
|
||||
checklist_item_annotation(step, ci, text)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue