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.
online
1 parent f39286e commit 3d52ef1Copy full SHA for 3d52ef1
src/api/comparator.ts
@@ -1,9 +1,11 @@
1
import type { TOnlineTimerMetrics } from './wrappers.ts';
2
import { ESortOrder } from './settings.ts';
3
4
+const SEMISORTING_FIELDS = ['calls', 'delay', 'online'];
5
+
6
// descending sort by `handler` field
7
function compareIfEqual<T>(field: keyof T, first: T, second: T) {
- if (field === 'calls' || field === 'delay') {
8
+ if (SEMISORTING_FIELDS.includes(field as string)) {
9
// @ts-ignore
10
return second['handler'] > first['handler'] ? 1 : -1;
11
} else {
0 commit comments