Avoid unnecessary size_kb
calculation, for large files, in PDFDocumentProperties._parseFileSize
(PR 13050 follow-up)
This commit is contained in:
parent
34c9e889ac
commit
bdde621366
@ -262,7 +262,7 @@ class PDFDocumentProperties {
|
|||||||
}
|
}
|
||||||
return this.l10n.get(`document_properties_${mb >= 1 ? "mb" : "kb"}`, {
|
return this.l10n.get(`document_properties_${mb >= 1 ? "mb" : "kb"}`, {
|
||||||
size_mb: mb >= 1 && (+mb.toPrecision(3)).toLocaleString(),
|
size_mb: mb >= 1 && (+mb.toPrecision(3)).toLocaleString(),
|
||||||
size_kb: (+kb.toPrecision(3)).toLocaleString(),
|
size_kb: mb < 1 && (+kb.toPrecision(3)).toLocaleString(),
|
||||||
size_b: fileSize.toLocaleString(),
|
size_b: fileSize.toLocaleString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user