Skip to content

Commit 4525ff5

Browse files
committed
refactor: simplify negated matcher condition
1 parent 2d75bc9 commit 4525ff5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/node-utils.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,11 @@ export function getAssertNodeInfo(
279279
}
280280

281281
let matcher = ASTUtils.getPropertyName(node);
282-
let isNegated = false;
283-
if (matcher === 'not') {
282+
const isNegated = matcher === 'not';
283+
if (isNegated) {
284284
matcher = isMemberExpression(node.parent)
285285
? ASTUtils.getPropertyName(node.parent)
286286
: null;
287-
isNegated = true;
288287
}
289288

290289
if (!matcher) {

0 commit comments

Comments
 (0)