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.
1 parent ec3fa8b commit 645f98aCopy full SHA for 645f98a
lib/util/SortableSet.js
@@ -34,7 +34,7 @@ class SortableSet extends Set {
34
}
35
36
sortWith(/** @type {(a: any, b: any) => number} */ sortFn) {
37
- if (this.size === 0 || sortFn === this._lastActiveSortFn) {
+ if (this.size <= 1 || sortFn === this._lastActiveSortFn) {
38
// already sorted - nothing to do
39
return;
40
0 commit comments