Skip to content

Commit

Permalink
fix: keep sort order (#105)
Browse files Browse the repository at this point in the history
Using stale sort to preserve original order
  • Loading branch information
nakamume authored May 10, 2024
1 parent 90151b9 commit 2f42372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subtitles.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ func (s *Subtitles) Order() {
}

// Order
sort.Slice(s.Items, func(i, j int) bool {
sort.SliceStable(s.Items, func(i, j int) bool {
return s.Items[i].StartAt < s.Items[j].StartAt
})
}
Expand Down

0 comments on commit 2f42372

Please sign in to comment.