From c8addbf555c6c1188294bda515104c221c77a70a Mon Sep 17 00:00:00 2001 From: Splines Date: Thu, 14 Dec 2023 16:27:08 +0100 Subject: [PATCH] Fix wrong manual Style/ correction of 5081aaa --- app/models/manuscript.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/models/manuscript.rb b/app/models/manuscript.rb index ee34b6e7b..3316d5fb7 100644 --- a/app/models/manuscript.rb +++ b/app/models/manuscript.rb @@ -417,10 +417,9 @@ def new_chapters # sections in a manuscript chapter not represented in mampf def new_sections_in_chapter(chapter) sections = sections_in_chapter(chapter) - sections.each_with_index - .map do |s, i| - [s["mampf_section"], i + 1, s["description"], s["counter"]] - end + sections = sections.each_with_index.map do |s, i| + [s["mampf_section"], i + 1, s["description"], s["counter"]] + end sections.select { |s| s.first.nil? } .map { |s| [s.second, s.third, s.fourth] } end