From 6480374caa6172905b0f895985937bbae44ffe87 Mon Sep 17 00:00:00 2001 From: MiliusCZ Date: Sun, 22 Jul 2018 00:59:15 +0200 Subject: [PATCH] Update fetch-sheet.js Modified cleanRows function to recongize also negative numbers --- src/fetch-sheet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fetch-sheet.js b/src/fetch-sheet.js index 11e4420..e14d782 100644 --- a/src/fetch-sheet.js +++ b/src/fetch-sheet.js @@ -41,7 +41,7 @@ const cleanRows = rows => .mapValues(val => { if (val === "") return null; // sheets apparently leaves commas in some #s depending on formatting - if (val.replace(/[,\.\d]/g, "").length === 0 && val !== "") { + if (val.replace(/[,\.\-\d]/g, "").length === 0 && val !== "") { return Number(val.replace(/,/g, "")); } if (val === "TRUE") return true;