Skip to content

Commit

Permalink
Merge pull request #771 from prey/location-order-by-signalStrength
Browse files Browse the repository at this point in the history
change order by signalStrength
  • Loading branch information
SoraKenji authored Jun 12, 2023
2 parents 16c00a7 + 2d9d81d commit 6326e18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/agent/providers/geo/strategies.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function wifi(cb) {

if (list && Array.isArray(list) && list.length > 1) {
list = list.sort((a, b) => {
return a.signal_strength - b.signal_strength;
return b.signal_strength - a.signal_strength;
});
}

Expand All @@ -76,7 +76,7 @@ function wifi(cb) {

if (aps && Array.isArray(aps) && aps.length > 1) {
aps = aps.sort((a, b) => {
return a.signalStrength - b.signalStrength;
return b.signalStrength - a.signalStrength;
});
}

Expand Down

0 comments on commit 6326e18

Please sign in to comment.