Skip to content

Commit

Permalink
Fix sorting of files in the changes tab
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp-work committed Mar 23, 2023
1 parent 6204c0a commit 940ece9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/components/sourcediff_component.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
%h4
#{diff_label(sourcediff['new'])}#{diff_label(sourcediff['old'])}
- if sourcediff['filenames'].present?
= render(DiffListComponent.new(diff_list: sourcediff['files'], view_id: @action[:spkg], commentable:))
- diff_list = sourcediff['files'].sort_by { |k, _v| sourcediff['filenames'].find_index(k) }.to_h
= render(DiffListComponent.new(diff_list:, view_id: @action[:spkg], commentable:))
- else
.mb-2
%p.lead
Expand Down

0 comments on commit 940ece9

Please sign in to comment.