Fix entity sorting
This commit is contained in:
parent
022a12ce31
commit
8aa5187e2e
|
@ -59,8 +59,8 @@ func SortEntities(entities []*client.TextEntity) []*client.TextEntity {
|
|||
copy(sortedEntities, entities)
|
||||
|
||||
sort.Slice(sortedEntities, func(i int, j int) bool {
|
||||
entity1 := entities[i]
|
||||
entity2 := entities[j]
|
||||
entity1 := sortedEntities[i]
|
||||
entity2 := sortedEntities[j]
|
||||
if entity1.Offset < entity2.Offset {
|
||||
return true
|
||||
} else if entity1.Offset == entity2.Offset {
|
||||
|
|
Loading…
Reference in a new issue