summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-04-01 18:41:53 +0200
committerJo-Philipp Wich <jo@mein.io>2020-04-01 18:45:18 +0200
commitf1aa3f8f6e378a2fd212590cb3c7b426c014e8ba (patch)
treea0e593face477eb0acb92df23173691c6e4a3e1a /modules
parent16f0997bdbf85df0c7bae7f0773a118714d15cdf (diff)
luci-base: ui.js: properly handle null choices in dropdown constructor
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/ui.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js
index acc37008d1..163edb8eae 100644
--- a/modules/luci-base/htdocs/luci-static/resources/ui.js
+++ b/modules/luci-base/htdocs/luci-static/resources/ui.js
@@ -929,7 +929,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
* expression. Only applicable when `create` is `true`.
*/
__init__: function(value, choices, options) {
- if (typeof(choices) != 'object')
+ if (!L.isObject(choices))
choices = {};
if (!Array.isArray(value))