Skip to content

Commit 7b81ba5

Browse files
committed
compat whoopsie
1 parent e110062 commit 7b81ba5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/compat.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ export function findVariable(context: CompatContext, node: TSESTree.Identifier)
3737
return ASTUtils.findVariable(getScope(context, node), node);
3838
}
3939

40-
export function markVariableAsUsed(context: CompatContext, name: string, node: TSESTree.Node) {
40+
export function markVariableAsUsed(
41+
context: CompatContext,
42+
name: string,
43+
node: TSESTree.Node
44+
): void {
4145
if (typeof context.markVariableAsUsed === "function") {
4246
context.markVariableAsUsed(name);
47+
} else {
48+
getSourceCode(context).markVariableAsUsed(name, node);
4349
}
44-
getSourceCode(context).markVariableAsUsed(name, node);
4550
}

0 commit comments

Comments
 (0)