luci-base: ui.js: UISelect: fix check for empty choices
authorJo-Philipp Wich <jo@mein.io>
Sun, 11 Aug 2019 18:52:51 +0000 (20:52 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 14 Aug 2019 20:58:15 +0000 (22:58 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js

index 11886b91fe1ba31dcc4f2fe02fb974279c0f680b..2a7c44ad89f801609b4be891300243942a77eff5 100644 (file)
@@ -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))