luci-app-samba4: prevent calling split() on array or null values
authorJo-Philipp Wich <jo@mein.io>
Mon, 31 May 2021 09:25:54 +0000 (11:25 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 31 May 2021 09:25:54 +0000 (11:25 +0200)
commitc4cdfcbe5121d5959dac1e18ed11b8611a86fb9e
tree6567e2371584c3f0d8dbaac5ecdf75283e274d1d
parent00d518d697fb37e40f405e7d9e7d6540f7243b0f
luci-app-samba4: prevent calling split() on array or null values

Since `uci.get()` may return null or array values, we cannot blindly call
split() on the result. Use the safe `L.toArray()` helper which is intended
to deal with such situations.

Also clean up whitespace while we're at.

Fixes: #5080
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-samba4/htdocs/luci-static/resources/view/samba4.js