Skip to content

Commit

Permalink
Fix linting issue (#1917)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Sep 22, 2022
1 parent be13fe8 commit 9a1adfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/custom-error-definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function * customErrorDefinition(context, node) {

if (!nameProperty?.value || nameProperty.value.value !== name) {
yield {
node: nameProperty?.value ? nameProperty.value : constructorBodyNode,
node: nameProperty?.value ?? constructorBodyNode,
message: `The \`name\` property should be set to \`${name}\`.`,
};
}
Expand Down

0 comments on commit 9a1adfa

Please sign in to comment.