From 8e524e03adce6264ec4e0b5e9dd52f71fb4cd2ed Mon Sep 17 00:00:00 2001 From: Benjamin Lannon Date: Tue, 19 Feb 2019 18:57:16 -0500 Subject: [PATCH] Removing # when running function --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index 4bfcf3d..4d029c7 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,13 @@ async function run() { let liveLabels = await getCurrentLabels(); let newLabels = JSON.parse(fs.readFileSync(newLabelsUrl).toString()); + // If the color of a label has a # sign, remove it + newLabels.forEach(newLabel => { + if (newLabel.color[0] === "#") { + newLabel.color = newLabel.color.slice(1); + } + }); + let labelModList = diffLabels(liveLabels, newLabels); labelModList.forEach(async mod => {