Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new rule prefer-presence-queries #98

Merged
merged 10 commits into from
Mar 28, 2020
Prev Previous commit
Next Next commit
fix(prefer-presence-queries): guard against nil matcher
  • Loading branch information
Belco90 committed Mar 28, 2020
commit 7aeab953c72d1cb3cb31caf4d5cdaf5f43caae13
2 changes: 1 addition & 1 deletion lib/rules/prefer-presence-queries.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {

if (expectCallNode) {
const expectStatement = expectCallNode.parent;
let matcher = expectStatement.property.name;
let matcher = expectStatement.property && expectStatement.property.name;
let isNegatedMatcher = false;

if (matcher === 'not') {
Expand Down