Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Dec 29, 2023
1 parent 69b262b commit 6e89a67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rules/no-deprecated-router-transition-methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ module.exports = {

const currentClass = classStack.peek();

if (!currentClass) {
return;
}

if (types.isThisExpression(node.object) && types.isIdentifier(node.property)) {
// Routes should not call transitionTo or replaceWith
const propertyName = node.property.name;
Expand Down

0 comments on commit 6e89a67

Please sign in to comment.