projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16f0997
)
luci-base: ui.js: properly handle null choices in dropdown constructor
author
Jo-Philipp Wich
<jo@mein.io>
Wed, 1 Apr 2020 16:41:53 +0000
(18:41 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Wed, 1 Apr 2020 16:45:18 +0000
(18:45 +0200)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/ui.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/ui.js
b/modules/luci-base/htdocs/luci-static/resources/ui.js
index acc37008d1b26206c9aca0059dab1454cc4667f4..163edb8eaedbb89e5d9bd596e8d41986348cb82b 100644
(file)
--- 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))