luci-base: ui.js: properly handle null choices in dropdown constructor
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
16f0997bdb
commit
f1aa3f8f6e
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user