Skip to content

Commit 52f2c9f

Browse files
Fix descending sort being non-deterministic
Descending sort would sort differently for the same data on rerender for items that evaluated to the same value.
1 parent 3b39f52 commit 52f2c9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function orderBy (arr, funcs, dirs) {
8080
}
8181
return dirs[0]
8282
? a.__index - b.__index
83-
: b.__index - b.__index
83+
: b.__index - a.__index
8484
})
8585
}
8686

0 commit comments

Comments
 (0)