mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
Use default sort order for ties (stable sort)
This commit is contained in:
parent
1378b4d2b4
commit
b86372f96b
@ -296,6 +296,12 @@ class MutableBoardTree implements BoardTree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let result = aValue.localeCompare(bValue)
|
let result = aValue.localeCompare(bValue)
|
||||||
|
|
||||||
|
if (result === 0) {
|
||||||
|
// In case of "ties", use the default order
|
||||||
|
result = this.defaultOrder(a, b)
|
||||||
|
}
|
||||||
|
|
||||||
if (sortOption.reversed) {
|
if (sortOption.reversed) {
|
||||||
result = -result
|
result = -result
|
||||||
}
|
}
|
||||||
@ -375,6 +381,11 @@ class MutableBoardTree implements BoardTree {
|
|||||||
result = aValue.localeCompare(bValue)
|
result = aValue.localeCompare(bValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (result === 0) {
|
||||||
|
// In case of "ties", use the default order
|
||||||
|
result = this.defaultOrder(a, b)
|
||||||
|
}
|
||||||
|
|
||||||
if (sortOption.reversed) {
|
if (sortOption.reversed) {
|
||||||
result = -result
|
result = -result
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user