Skip to content

Commit

Permalink
refactor: dont use toSorted
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Apr 25, 2024
1 parent e87d225 commit fdd9c1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utilities/collection/src/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class Collection<T extends CollectionItem = CollectionItem> {
* Sort the values based on their index
*/
sort = (values: string[]): string[] => {
return values.toSorted(this.sortFn)
return [...values].sort(this.sortFn)
}

/**
Expand Down

0 comments on commit fdd9c1e

Please sign in to comment.