fix: default to big latency for items with unavailable statistics when sorting
for https://github.com/haishanh/yacd/issues/496
This commit is contained in:
parent
0bf2d72d05
commit
c848d8414e
2 changed files with 1 additions and 7 deletions
|
@ -84,13 +84,9 @@ function ProxyGroupImpl({ name, all, type, now, isOpen, apiConfig, dispatch }) {
|
|||
}
|
||||
|
||||
const getSortDelay = (d, w) => {
|
||||
if (d === undefined) {
|
||||
return 0;
|
||||
}
|
||||
if (!d.error && d.number > 0) {
|
||||
if (d && typeof d.number === 'number' && d.number > 0) {
|
||||
return d.number;
|
||||
}
|
||||
|
||||
return w;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import * as React from 'react';
|
||||
|
||||
/* import cx from 'clsx'; */
|
||||
|
||||
import { Proxy, ProxySmall } from './Proxy';
|
||||
|
||||
import s from './ProxyList.module.css';
|
||||
|
|
Loading…
Reference in a new issue