luci-mod-status: fix channel_analysis ReferenceError: diff is not defined

In refactoring the code there was an error and the sort function wasn't
correctly reworked with diff not correctly dropped.

Drop that and correctly sort the WiFi ap if the channel is different.

Fixes: 75dcb09754 ("luci-mod-status: improve channel_analysis page")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2022-12-23 19:18:39 +01:00
parent 9e7f1c81c7
commit 54f5b171bc
No known key found for this signature in database
GPG key ID: AC001D09ADBFEAD7

View file

@ -231,7 +231,7 @@ return view.extend({
results.sort(function(a, b) {
if (a.channel - b.channel)
return diff;
return 1;
if (a.ssid < b.ssid)
return -1;