We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sort
toSorted
1 parent 74a800e commit 9e79de6Copy full SHA for 9e79de6
packages/snaps-sandbox/src/features/sidebar/components/History.tsx
@@ -18,7 +18,8 @@ export const History: FunctionComponent = () => {
18
const [favorite, regular] = useMemo(
19
() =>
20
history
21
- .toSorted((a, b) => b.timestamp - a.timestamp)
+ // TODO: Use `toSorted` when dropping support for Node 18.
22
+ .sort((a, b) => b.timestamp - a.timestamp)
23
.reduce<[favorite: HistoryEntry[], regular: HistoryEntry[]]>(
24
(array, entry) => {
25
if (entry.favorite) {
0 commit comments