Skip to content

Commit

Permalink
Make Scope.isFunctionBlockScope slightly simpler and faster.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147869629
  • Loading branch information
tbreisacher authored and dimvar committed Feb 19, 2017
1 parent 0be3327 commit 511e690
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/google/javascript/jscomp/Scope.java
Expand Up @@ -234,7 +234,7 @@ public boolean isBlockScope() {
}

public boolean isFunctionBlockScope() {
return isBlockScope() && parent != null && parent.getRootNode().isFunction();
return NodeUtil.isFunctionBlock(getRootNode());
}

public boolean isFunctionScope() {
Expand Down

0 comments on commit 511e690

Please sign in to comment.