Skip to content

Commit

Permalink
Added safe navigation to ruleMetadata due to it sometimes being undef…
Browse files Browse the repository at this point in the history
…ined
  • Loading branch information
bert-mccutchen committed Feb 4, 2024
1 parent 2b4d11b commit 095aa28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stylelint-formatter-rdjson/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
};

Expand Down

0 comments on commit 095aa28

Please sign in to comment.