mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
uspot: def_captive may not exist
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
This commit is contained in:
committed by
John Crispin
parent
f770253a52
commit
cf8769e4b5
@@ -6,7 +6,7 @@ let uci = require('uci').cursor();
|
||||
let config = uci.get_all('uspot');
|
||||
|
||||
global.handle_request = function(env) {
|
||||
if (env.REMOTE_ADDR && +config.def_captive.debug)
|
||||
if (env.REMOTE_ADDR && +config?.def_captive?.debug)
|
||||
warn('uspot: ' + env.REMOTE_ADDR + ' - CPD redirect\n');
|
||||
include('cpd.uc', { env });
|
||||
};
|
||||
|
||||
@@ -90,7 +90,7 @@ return {
|
||||
},
|
||||
|
||||
debug: function(ctx, msg) {
|
||||
if (+config.def_captive.debug)
|
||||
if (+config.def_captive?.debug)
|
||||
this.syslog(ctx, msg);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user