From fa1a39c4ecea4c3d239d655869118910300fe256 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Thu, 22 Sep 2022 10:03:11 +0800 Subject: [PATCH] Fix linting issue --- rules/custom-error-definition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/custom-error-definition.js b/rules/custom-error-definition.js index 8fe6b3f29b..aa86ddf4cd 100644 --- a/rules/custom-error-definition.js +++ b/rules/custom-error-definition.js @@ -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}\`.`, }; }