Skip to content

Commit 4c62e43

Browse files
small refactor to updateFileSize.
1 parent 08c2239 commit 4c62e43

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

public/table-sort.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,17 +416,13 @@ function tableSortJs(testingTableSortJS = false, domDocumentWindow = document) {
416416
template.innerHTML = columnIndexAndTableRow[column.toBeSorted[i]];
417417
tr = template.content.firstChild;
418418
}
419-
let fileSizeInBytesHTML = column.getColumn(
419+
let getColumnTd = column.getColumn(
420420
tr,
421421
column.spanSum,
422422
column.span
423-
).outerHTML;
424-
const fileSizeInBytesText = column.getColumn(
425-
tr,
426-
column.spanSum,
427-
column.span
428-
).textContent;
429-
423+
);
424+
let fileSizeInBytesHTML = getColumnTd.outerHTML
425+
const fileSizeInBytesText = getColumnTd.textContent
430426
const fileSize = column.toBeSorted[i].replace(/#[0-9]*/, "");
431427
let prefixes = ["", "Ki", "Mi", "Gi", "Ti", "Pi"];
432428
let replaced = false;

0 commit comments

Comments
 (0)