diff --git a/dist/index.js b/dist/index.js index 9dc5514..a3fbafc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -13907,6 +13907,8 @@ const ICONS = { const CRITERIAS = ["lines", "branches", "functions", "statements"]; function _renderPct(pct, addSign = true) { + if (!pct.toFixed) { return pct } + if (addSign && pct >= 0) { return `+${pct.toFixed(2)}%`; } diff --git a/src/diff.js b/src/diff.js index 963ba75..18d8f1b 100644 --- a/src/diff.js +++ b/src/diff.js @@ -9,6 +9,8 @@ const ICONS = { const CRITERIAS = ["lines", "branches", "functions", "statements"]; function _renderPct(pct, addSign = true) { + if (!pct.toFixed) { return pct } + if (addSign && pct >= 0) { return `+${pct.toFixed(2)}%`; }