From a0aab58d3a9bd578565fdabeb799c28a70203ce3 Mon Sep 17 00:00:00 2001 From: intrueder Date: Thu, 5 Jan 2017 10:31:17 +0200 Subject: [PATCH] Fix "SyntaxError: missing = in const declaration" in Firefox. fixes #83 --- src/humanize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/humanize.js b/src/humanize.js index afe4354..ed7311e 100644 --- a/src/humanize.js +++ b/src/humanize.js @@ -147,7 +147,7 @@ // Formats the value like a 'human-readable' file size (i.e. '13 KB', '4.1 MB', '102 bytes', etc). fileSize(filesize, precision = 2) { - for (const label in LABELS_FOR_POWERS_OF_KILO) { + for (let label in LABELS_FOR_POWERS_OF_KILO) { if (LABELS_FOR_POWERS_OF_KILO.hasOwnProperty(label)) { const minnum = LABELS_FOR_POWERS_OF_KILO[label]; if (filesize >= minnum) { @@ -352,7 +352,7 @@ if (exists(object) && typeof object === 'object' && !isArray(object)) { const defs = []; - for (const key in object) { + for (let key in object) { if (object.hasOwnProperty(key)) { const val = object[key]; defs.push(`${ key }${ joiner }${ val }`);