Skip to content

Commit

Permalink
fixed files form Closure #91
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 6038d71 commit a978b58
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ public boolean shouldTraverse(NodeTraversal t, Node n, Node parent) {
}

// Don't traverse functions that are getting lent to a prototype.
Node gramps = parent.getParent();
if (NodeUtil.isObjectLitKey(parent, gramps)) {
JSDocInfo maybeLends = gramps.getJSDocInfo();
if (maybeLends != null &&
maybeLends.getLendsName() != null &&
maybeLends.getLendsName().endsWith(".prototype")) {
return false;
}
}
}

if (parent != null && parent.getType() == Token.ASSIGN) {
Expand Down

0 comments on commit a978b58

Please sign in to comment.