Skip to content

Commit 9a1adfa

Browse files
authored
Fix linting issue (#1917)
1 parent be13fe8 commit 9a1adfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/custom-error-definition.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function * customErrorDefinition(context, node) {
139139

140140
if (!nameProperty?.value || nameProperty.value.value !== name) {
141141
yield {
142-
node: nameProperty?.value ? nameProperty.value : constructorBodyNode,
142+
node: nameProperty?.value ?? constructorBodyNode,
143143
message: `The \`name\` property should be set to \`${name}\`.`,
144144
};
145145
}

0 commit comments

Comments
 (0)