luci-base: ui.js: properly handle null choices in dropdown constructor
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f1aa3f8f6e
)
This commit is contained in:
parent
e5e71a55ab
commit
50c9be16b9
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ var UISelect = UIElement.extend({
|
|||
|
||||
var UIDropdown = UIElement.extend({
|
||||
__init__: function(value, choices, options) {
|
||||
if (typeof(choices) != 'object')
|
||||
if (!L.isObject(choices))
|
||||
choices = {};
|
||||
|
||||
if (!Array.isArray(value))
|
||||
|
|
Loading…
Reference in a new issue