From 5fce6bdccf51b92ff988083d837e791929c54f14 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Wed, 31 Jul 2024 12:02:12 +1200 Subject: [PATCH] =?UTF-8?q?fix:=20Removed=20isSvgFile=20references=20as=20?= =?UTF-8?q?only=20want=20to=20emit=20JSON=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/index.js b/index.js index 0090979..e982644 100644 --- a/index.js +++ b/index.js @@ -118,27 +118,27 @@ try { data.labelColor = labelColor; } - if (!isSvgFile && isError != "") { + if (isError != "") { data.isError = isError; } - if (!isSvgFile && namedLogo != "") { + if (namedLogo != "") { data.namedLogo = namedLogo; } - if (!isSvgFile && logoSvg != "") { + if (logoSvg != "") { data.logoSvg = logoSvg; } - if (!isSvgFile && logoColor != "") { + if (logoColor != "") { data.logoColor = logoColor; } - if (!isSvgFile && logoWidth != "") { + if (logoWidth != "") { data.logoWidth = parseInt(logoWidth); } - if (!isSvgFile && logoPosition != "") { + if (logoPosition != "") { data.logoPosition = logoPosition; } @@ -146,18 +146,13 @@ try { data.style = style; } - if (!isSvgFile && cacheSeconds != "") { + if (cacheSeconds != "") { data.cacheSeconds = parseInt(cacheSeconds); } let content = ""; - if (isSvgFile) { - content = makeBadge(data); - } else { - content = JSON.stringify({ payload: { data } }); - } - + content = JSON.stringify({ payload: { data } }); updateBadge(content);