gluon-web-wifi-config: make the code a bit nicer
simple-uci will now delete an option when nil is passed.
This commit is contained in:
parent
0fee6cc707
commit
73ad23936e
@ -92,10 +92,9 @@ uci:foreach('wireless', 'wifi-device', function(config)
|
||||
|
||||
function tp:write(data)
|
||||
if data == 'default' then
|
||||
uci:delete('wireless', radio, 'txpower')
|
||||
else
|
||||
uci:set('wireless', radio, 'txpower', data)
|
||||
data = nil
|
||||
end
|
||||
uci:set('wireless', radio, 'txpower', data)
|
||||
end
|
||||
end)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user