From 095aa2871d3ed9ece70109496a00d31330a92093 Mon Sep 17 00:00:00 2001 From: Bert McCutchen Date: Sun, 4 Feb 2024 14:28:20 -0500 Subject: [PATCH] Added safe navigation to ruleMetadata due to it sometimes being undefined --- stylelint-formatter-rdjson/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stylelint-formatter-rdjson/index.js b/stylelint-formatter-rdjson/index.js index 3766770..4a404aa 100644 --- a/stylelint-formatter-rdjson/index.js +++ b/stylelint-formatter-rdjson/index.js @@ -33,7 +33,7 @@ module.exports = function (results, returnValue) { severity: warning.severity.toUpperCase(), code: { value: warning.rule, - url: returnValue.ruleMetadata[warning.rule]?.url + url: returnValue.ruleMetadata?.[warning.rule]?.url } };