luci: fix nil value error
This commit is contained in:
parent
a31b010e8c
commit
71f43d8da7
@ -270,10 +270,12 @@ o.rows = 5
|
|||||||
o.wrap = "off"
|
o.wrap = "off"
|
||||||
o.remove = function(self, section)
|
o.remove = function(self, section)
|
||||||
local node_value = node:formvalue(global_cfgid)
|
local node_value = node:formvalue(global_cfgid)
|
||||||
local node_t = m:get(node_value)
|
if node_value ~= "nil" then
|
||||||
|
local node_t = m:get(node_value) or {}
|
||||||
if node_t.type == "Xray" then
|
if node_t.type == "Xray" then
|
||||||
AbstractValue.remove(self, section)
|
AbstractValue.remove(self, section)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect."))
|
o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"), translate("Try this feature if the rule modification does not take effect."))
|
||||||
|
Loading…
Reference in New Issue
Block a user