Skip to content
Snippets Groups Projects
Unverified Commit 73ad2393 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-web-wifi-config: make the code a bit nicer

simple-uci will now delete an option when nil is passed.
parent 0fee6cc7
No related branches found
No related tags found
No related merge requests found
...@@ -92,10 +92,9 @@ uci:foreach('wireless', 'wifi-device', function(config) ...@@ -92,10 +92,9 @@ uci:foreach('wireless', 'wifi-device', function(config)
function tp:write(data) function tp:write(data)
if data == 'default' then if data == 'default' then
uci:delete('wireless', radio, 'txpower') data = nil
else
uci:set('wireless', radio, 'txpower', data)
end end
uci:set('wireless', radio, 'txpower', data)
end end
end) end)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment