diff --git a/.github/actions/update-badge/endpoint.js b/.github/actions/update-badge/endpoint.js index 79f3934c..b94cb87c 100644 --- a/.github/actions/update-badge/endpoint.js +++ b/.github/actions/update-badge/endpoint.js @@ -80,6 +80,10 @@ function colorScale(steps, colors, reversed) { } function age(date) { + if (!date.add) { + return "red" + } + const now = moment() const then = moment(date) if (now.diff(date) < 0) date.add(-1, 'y')