From bdde621366db14af008c3612730d92ac72dad610 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald <jonas.jenwald@gmail.com> Date: Fri, 5 Mar 2021 16:45:13 +0100 Subject: [PATCH] Avoid unnecessary `size_kb` calculation, for large files, in `PDFDocumentProperties._parseFileSize` (PR 13050 follow-up) --- web/pdf_document_properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pdf_document_properties.js b/web/pdf_document_properties.js index 9ecbb2c3a..ab1173b6b 100644 --- a/web/pdf_document_properties.js +++ b/web/pdf_document_properties.js @@ -262,7 +262,7 @@ class PDFDocumentProperties { } return this.l10n.get(`document_properties_${mb >= 1 ? "mb" : "kb"}`, { 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(), }); }