luci-base: Code quality fixes
handle (possibly incorrect) comment variants <!-- --> <!-- --!> Signed-off-by: Paul Donald <newtwen@gmail.com>
This commit is contained in:
parent
e7049d3f07
commit
4c2090afd8
1 changed files with 1 additions and 1 deletions
|
@ -1601,7 +1601,7 @@ var UIDropdown = UIElement.extend(/** @lends LuCI.ui.Dropdown.prototype */ {
|
|||
markup = null;
|
||||
|
||||
if (tpl)
|
||||
markup = (tpl.textContent || tpl.innerHTML || tpl.firstChild.data).replace(/^<!--|-->$/, '').trim();
|
||||
markup = (tpl.textContent || tpl.innerHTML || tpl.firstChild.data).replace(/^<!--|--!?>$/, '').trim();
|
||||
else
|
||||
markup = '<li data-value="{{value}}"><span data-label-placeholder="true" /></li>';
|
||||
|
||||
|
|
Loading…
Reference in a new issue