luci-mod-system: leds.js: fix handling device option
authorJo-Philipp Wich <jo@mein.io>
Fri, 18 Oct 2019 16:53:21 +0000 (18:53 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 18 Oct 2019 16:55:10 +0000 (18:55 +0200)
commit45b56e85a62c23b12f43dc8bcf60bb3930cbbe9f
treeb7bbaae3aa063cb47543211c83335805b8f5cf09
parent254503dc8a4ae7c7791ad96da835d72555796e4d
luci-mod-system: leds.js: fix handling device option

Since the modal overlay map was unable to read the current trigger value,
it mistakingly allowed the removal of the device option value.

Fix it by finding the option object through lookupOption() instead of
relying on a reference.

Fixes: #3216
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/leds.js