From 43a8c12f04f949563b2ac0be2c46a4033a509596 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 11 Aug 2019 20:52:51 +0200 Subject: luci-base: ui.js: UISelect: fix check for empty choices Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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)) -- cgit v1.2.3