luci-base: ui.js: UISelect: fix check for empty choices

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2019-08-11 20:52:51 +02:00
parent 5628329434
commit 43a8c12f04

View file

@ -207,7 +207,7 @@ var UICheckbox = UIElement.extend({
var UISelect = UIElement.extend({ var UISelect = UIElement.extend({
__init__: function(value, choices, options) { __init__: function(value, choices, options) {
if (typeof(choices) != 'object') if (!L.isObject(choices))
choices = {}; choices = {};
if (!Array.isArray(value)) if (!Array.isArray(value))