luci-proto-wireguard: correctness fixes
authorPaul Donald <redacted>
Tue, 26 May 2026 09:53:29 +0000 (12:53 +0300)
committerPaul Donald <redacted>
Wed, 27 May 2026 12:49:47 +0000 (15:49 +0300)
Signed-off-by: Paul Donald <redacted>
protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js

index 29a9687fca359dcdfae613510b8168d1683a4313..b8590886c3106c70ebf4e80ce65942aac0ab377a 100644 (file)
@@ -737,7 +737,7 @@ return network.registerProtocol('wireguard', {
 
                                let qrm, qrs, qro;
 
-                               qrm = new form.JSONMap({ config: { endpoint: hostnames[0], allowed_ips: ips, addresses: eips, dns_servers: dns } }, null, _('The generated configuration can be imported into a WireGuard client application to set up a connection towards this device.'));
+                               qrm = new form.JSONMap({ config: { endpoint: hostnames[0] || '', allowed_ips: ips, addresses: eips, dns_servers: dns } }, null, _('The generated configuration can be imported into a WireGuard client application to set up a connection towards this device.'));
                                qrm.parent = parent;
 
                                qrs = qrm.section(form.NamedSection, 'config');
git clone https://git.99rst.org/PROJECT