Merge pull request #587 from ZmagoD/zd_SCI_1233

fixes bug with empty checklist item [fixes SCI-1233]
This commit is contained in:
Zmago Devetak 2017-05-05 10:11:52 +02:00 committed by GitHub
commit f3415abe3e
2 changed files with 3 additions and 3 deletions

View file

@ -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() {

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