WebClient: fix icon for 0 byte files
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
bc8d71dfc7
commit
daf643596d
2 changed files with 4 additions and 4 deletions
|
@ -1258,7 +1258,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
if (row["type"] == "1") {
|
||||
return `<i class="fas fa-folder"></i> <a class="${cssClass}" href="${row['url']}" title="${title}">${shortened}</a>`;
|
||||
}
|
||||
if (row["size"] == "") {
|
||||
if (row["size"] === "") {
|
||||
return `<i class="fas fa-external-link-alt"></i> <a class="${cssClass}" href="${row['url']}" title="${title}">${shortened}</a>`;
|
||||
}
|
||||
let icon = getIconForFile(data);
|
||||
|
@ -1271,7 +1271,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
"data": "size",
|
||||
"render": function (data, type, row) {
|
||||
if (type === 'display') {
|
||||
if (data){
|
||||
if (data || data === 0){
|
||||
return fileSizeIEC(data);
|
||||
}
|
||||
return "";
|
||||
|
|
|
@ -490,7 +490,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
if (row["type"] == "1") {
|
||||
return `<i class="fas fa-folder"></i> <a class="${cssClass}" href="${row['url']}" title="${title}">${shortened}</a>`;
|
||||
}
|
||||
if (row["size"] == "") {
|
||||
if (row["size"] === "") {
|
||||
return `<i class="fas fa-external-link-alt"></i> <a class="${cssClass}" href="${row['url']}" title="${title}">${shortened}</a>`;
|
||||
}
|
||||
var icon = getIconForFile(data);
|
||||
|
@ -503,7 +503,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
"data": "size",
|
||||
"render": function (data, type, row) {
|
||||
if (type === 'display') {
|
||||
if (data){
|
||||
if (data || data === 0){
|
||||
return fileSizeIEC(data);
|
||||
}
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue