luci-base: Use getMode in getActiveMode

Signed-off-by: Evan Benn <evan.benn@morsemicro.com>
This commit is contained in:
Evan Benn 2023-12-08 13:18:41 +11:00
parent 23931c3778
commit e02df6505f

View file

@ -3837,7 +3837,7 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */
* - `Unknown`
*/
getActiveMode: function() {
var mode = this.ubus('net', 'iwinfo', 'mode') || this.ubus('net', 'config', 'mode') || this.get('mode') || 'ap';
var mode = this.ubus('net', 'iwinfo', 'mode') || this.getMode();
switch (mode) {
case 'ap': return 'Master';