mirror of
https://github.com/openwrt/luci.git
synced 2025-04-02 02:29:00 +00:00
luci-proto-wireguard: add extra checks for hostname when building qr
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
@ -724,12 +724,12 @@ return network.registerProtocol('wireguard', {
|
||||
var hostnames = [];
|
||||
|
||||
uci.sections('ddns', 'service', function(s) {
|
||||
if (typeof(s.lookup_host) == 'string' && s.enabled == '1')
|
||||
if (typeof(s?.lookup_host) == 'string' && s?.enabled == '1')
|
||||
hostnames.push(s.lookup_host);
|
||||
});
|
||||
|
||||
uci.sections('system', 'system', function(s) {
|
||||
if (typeof(s.hostname) == 'string' && s.hostname.indexOf('.') > 0)
|
||||
if (typeof(s?.hostname) == 'string' && s?.hostname?.indexOf('.') > 0)
|
||||
hostnames.push(s.hostname);
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user