From: Jo-Philipp Wich Date: Sun, 11 Aug 2019 18:52:51 +0000 (+0200) Subject: luci-base: ui.js: UISelect: fix check for empty choices X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=43a8c12f04f949563b2ac0be2c46a4033a509596;p=oweals%2Fluci.git luci-base: ui.js: UISelect: fix check for empty choices Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 11886b91f..2a7c44ad8 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -207,7 +207,7 @@ var UICheckbox = UIElement.extend({ var UISelect = UIElement.extend({ __init__: function(value, choices, options) { - if (typeof(choices) != 'object') + if (!L.isObject(choices)) choices = {}; if (!Array.isArray(value))