Fixed sorting hopefully

master
Keith Irwin 2022-09-15 22:00:48 -06:00
parent 6727d362c7
commit fd4d555ae8
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 3 additions and 1 deletions

View File

@ -36,7 +36,9 @@ function PeerList() {
}
self.peers(
user.peers.sort(
(a,b) => a.ipv4 - b.ipv4)
(a,b) => a.ipv4.split('.')[2] - b.ipv4.split('.')[2])
.sort(
(a,b) => a.ipv4.split('.')[3] - b.ipv4.split('.')[3])
.map( (i)=>new Peer(i))
)
self.token = user.token