Skip to content

Commit

Permalink
fix(await-interactions): add safecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Apr 15, 2022
1 parent 0bc9540 commit 1128ceb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/await-interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export = createStorybookRule({
return {
CallExpression(node: CallExpression) {
const method = getMethodThatShouldBeAwaited(node)
if (method && !isAwaitExpression(node.parent) && !isAwaitExpression(node.parent.parent)) {
if (method && !isAwaitExpression(node.parent) && !isAwaitExpression(node.parent?.parent)) {
invocationsThatShouldBeAwaited.push({ node, method })
}
},
Expand Down

0 comments on commit 1128ceb

Please sign in to comment.