Pull request: 4143 sort client ids
Merge in DNS/adguard-home from 4143-clients-sort to master
Updates #4143.
Squashed commit of the following:
commit a4b547eb46a54bdfdc7d342fab5f8ecfa54f5d06
Merge: d369c11c d82b2902
Author: Ildar Kamalov <ik@adguard.com>
Date: Thu Jan 20 11:58:42 2022 +0300
Merge branch 'master' into 4143-clients-sort
commit d369c11c69665510043f63e0283e1ca1b2974289
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Jan 19 16:53:39 2022 +0300
client: fix sort ip method
commit d767a1199c37ad9df7f3bc2d362d840b0226d836
Author: Ildar Kamalov <ik@adguard.com>
Date: Wed Jan 19 16:23:23 2022 +0300
client: sort client ids
This commit is contained in:
@@ -754,8 +754,10 @@ const getAddressesComparisonBytes = (item) => {
|
||||
*/
|
||||
export const sortIp = (a, b) => {
|
||||
try {
|
||||
const comparisonBytesA = getAddressesComparisonBytes(a);
|
||||
const comparisonBytesB = getAddressesComparisonBytes(b);
|
||||
const comparisonBytesA = Array.isArray(a)
|
||||
? getAddressesComparisonBytes(a[0]) : getAddressesComparisonBytes(a);
|
||||
const comparisonBytesB = Array.isArray(b)
|
||||
? getAddressesComparisonBytes(b[0]) : getAddressesComparisonBytes(b);
|
||||
|
||||
for (let i = 0; i < comparisonBytesA.length; i += 1) {
|
||||
const byteA = comparisonBytesA[i];
|
||||
|
||||
Reference in New Issue
Block a user