fix: Handle null response in nDPId settings view
- Add catch() handler for getInterfaces() API call - Provide fallback interface list if API returns null - Bump release to r2 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
458dd33ef5
commit
66f4f32655
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-ndpid
|
||||
PKG_VERSION:=0.9.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_ARCH:=all
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
@ -11,13 +11,13 @@ return view.extend({
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
uci.load('ndpid'),
|
||||
api.getInterfaces()
|
||||
api.getInterfaces().catch(function() { return {}; })
|
||||
]);
|
||||
},
|
||||
|
||||
render: function(data) {
|
||||
var interfaces = data[1] || {};
|
||||
var available = interfaces.available || [];
|
||||
var available = (interfaces && interfaces.available) ? interfaces.available : ['br-lan', 'eth0', 'eth1', 'wlan0'];
|
||||
|
||||
var m, s, o;
|
||||
|
||||
|
||||
0
package/secubox/luci-app-ndpid/root/usr/libexec/rpcd/luci.ndpid
Normal file → Executable file
0
package/secubox/luci-app-ndpid/root/usr/libexec/rpcd/luci.ndpid
Normal file → Executable file
Loading…
Reference in New Issue
Block a user