luci-base: cbi.js: avoid double-initialization of dropdowns
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
5258080ce3
commit
9ae1f47896
1 changed files with 3 additions and 0 deletions
|
@ -731,6 +731,9 @@ if (typeof(window.CustomEvent) !== 'function') {
|
|||
}
|
||||
|
||||
function cbi_dropdown_init(sb) {
|
||||
if (sb && L.dom.findClassInstance(sb) instanceof L.ui.Dropdown)
|
||||
return;
|
||||
|
||||
var dl = new L.ui.Dropdown(sb, null, { name: sb.getAttribute('name') });
|
||||
return dl.bind(sb);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue