luci-mod-status: fix channel_analysis ReferenceError: diff is not defined
authorChristian Marangi <ansuelsmth@gmail.com>
Fri, 23 Dec 2022 18:18:39 +0000 (19:18 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 23 Dec 2022 18:19:26 +0000 (19:19 +0100)
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: 75dcb0975472 ("luci-mod-status: improve channel_analysis page")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
modules/luci-mod-status/htdocs/luci-static/resources/view/status/channel_analysis.js

index 9f266ebef3c4840c7963a3cd3576cca9a3bbd5e0..ae675afa42da003818af7e8e13c60ba807bbab9f 100644 (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;