Showing
2 changed files
with
5 additions
and
5 deletions
| @@ -80,16 +80,16 @@ module Kanjai | @@ -80,16 +80,16 @@ module Kanjai | ||
| 80 | if subpart | 80 | if subpart |
| 81 | markers_position = {} | 81 | markers_position = {} |
| 82 | 82 | ||
| 83 | - names_array = [] | 83 | + names_array = {} |
| 84 | 84 | ||
| 85 | (subpart.conditions || []).each do |item| | 85 | (subpart.conditions || []).each do |item| |
| 86 | - names_array << item["name"] | 86 | + names_array[item["name"]] = item["name"] |
| 87 | end | 87 | end |
| 88 | subpart.field_options.each do |item| | 88 | subpart.field_options.each do |item| |
| 89 | - names_array << item[:name] | 89 | + names_array[item[:itemName]] = item[:name] |
| 90 | end | 90 | end |
| 91 | 91 | ||
| 92 | - names_array.uniq.sort.each_with_index do |name, index| | 92 | + names_array.sort.to_h.values.each_with_index do |name, index| |
| 93 | markers_position[name] = index | 93 | markers_position[name] = index |
| 94 | end | 94 | end |
| 95 | 95 |