diff --git a/lib/rules/await-interactions.ts b/lib/rules/await-interactions.ts index a01af73..216a3b8 100644 --- a/lib/rules/await-interactions.ts +++ b/lib/rules/await-interactions.ts @@ -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 }) } },