WebClient: fix icon for 0 byte files

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-10-29 08:27:00 +01:00
parent bc8d71dfc7
commit daf643596d
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
2 changed files with 4 additions and 4 deletions

View file

@ -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>&nbsp;<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>&nbsp;<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 "";

View file

@ -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>&nbsp;<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>&nbsp;<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 "";