aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings')
-rw-r--r--ext/bg/js/settings/storage-controller.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bg/js/settings/storage-controller.js b/ext/bg/js/settings/storage-controller.js
index bc57017f..32b98304 100644
--- a/ext/bg/js/settings/storage-controller.js
+++ b/ext/bg/js/settings/storage-controller.js
@@ -148,9 +148,10 @@ class StorageController {
_bytesToLabeledString(size) {
const base = 1000;
- const labels = [' bytes', 'KB', 'MB', 'GB'];
+ const labels = [' bytes', 'KB', 'MB', 'GB', 'TB'];
+ const maxLabelIndex = labels.length - 1;
let labelIndex = 0;
- while (size >= base) {
+ while (size >= base && labelIndex < maxLabelIndex) {
size /= base;
++labelIndex;
}