Skip to content

Commit

Permalink
Don't link exported const vars to module definition
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158087947
  • Loading branch information
salguarnieri authored and brad4d committed Jun 6, 2017
1 parent ec7899c commit 8b406d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/com/google/javascript/jscomp/ClosureRewriteModule.java
Expand Up @@ -1629,11 +1629,11 @@ private void replaceStringNodeLocationForExportedTopLevelVariable(
// ASSIGN always has two children.
Node getProp = assign.getFirstChild();
if (getProp != null && getProp.isGetProp()) {
// GETPROP always has two children.
Node stringNode = getProp.getLastChild();
if (stringNode != null && stringNode.isString()) {
stringNode.setSourceEncodedPosition(sourcePosition);
stringNode.setLength(length);
// GETPROP always has two children: a name node and a string node. They should both take
// on the source range of the original variable.
for (Node child : getProp.children()) {
child.setSourceEncodedPosition(sourcePosition);
child.setLength(length);
}
}
}
Expand Down

0 comments on commit 8b406d6

Please sign in to comment.