mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 10:31:55 +08:00
luci-base: fix "null" text appearing in modal
fix "null" text appearing in modal
UPDATE: added {} in for-loop for readability - CK
Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
This commit is contained in:
committed by
Florian Eckert
parent
55a4b33aaf
commit
7b02b9add5
@@ -1376,11 +1376,12 @@
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (Array.isArray(children)) {
|
if (Array.isArray(children)) {
|
||||||
for (let i = 0; i < children.length; i++)
|
for (let i = 0; i < children.length; i++) {
|
||||||
if (this.elem(children[i]))
|
if (this.elem(children[i]))
|
||||||
node.appendChild(children[i]);
|
node.appendChild(children[i]);
|
||||||
else if (children !== null && children !== undefined)
|
else if (children[i] !== null && children[i] !== undefined)
|
||||||
node.appendChild(document.createTextNode(`${children[i]}`));
|
node.appendChild(document.createTextNode(`${children[i]}`));
|
||||||
|
}
|
||||||
|
|
||||||
return node.lastChild;
|
return node.lastChild;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4993,7 +4993,7 @@ const UI = baseclass.extend(/** @lends LuCI.ui.prototype */ {
|
|||||||
if (info)
|
if (info)
|
||||||
infoNode = E('p', _('%s').format(info));
|
infoNode = E('p', _('%s').format(info));
|
||||||
|
|
||||||
UI.prototype.showModal(_('Uploading file…'), [ progress, infoNode ? infoNode : null ]);
|
UI.prototype.showModal(_('Uploading file…'), [ progress, infoNode ]);
|
||||||
|
|
||||||
const data = new FormData();
|
const data = new FormData();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user