mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Merge pull request #587 from ZmagoD/zd_SCI_1233
fixes bug with empty checklist item [fixes SCI-1233]
This commit is contained in:
commit
f3415abe3e
2 changed files with 3 additions and 3 deletions
|
@ -517,7 +517,7 @@ $("[data-action='new-step']").on("ajax:success", function(e, data) {
|
|||
applyCancelOnNew();
|
||||
toggleButtons(false);
|
||||
initializeCheckboxSorting();
|
||||
TinyMCE.init();
|
||||
TinyMCE.refresh();
|
||||
|
||||
$("#step_name").focus();
|
||||
$("#new-step-main-tab a").on("shown.bs.tab", function() {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue