Skip to content

Commit

Permalink
use main_language_label helper for build_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Sep 4, 2023
1 parent 01e032d commit 74a4440
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def build_tree(node, string, id, concept_schemes: [])

return string if node.children.nil? || node.children.empty?

node.children.sort! { |a, b| (select_language_label(a.prefLabel)&.last || a.id).downcase <=> (select_language_label(b.prefLabel)&.last || b.id).downcase }
node.children.sort! { |a, b| (main_language_label(a.prefLabel) || a.id).downcase <=> (main_language_label(a.prefLabel) || b.id).downcase }
node.children.each do |child|
active_style = child.id.eql?(id) ? "active" : ''

Expand Down

0 comments on commit 74a4440

Please sign in to comment.