fix case for anonymous functions.
git-svn-id: svn://10.0.0.236/trunk@58384 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -510,10 +510,13 @@ public class NodeTransformer {
|
||||
if (nodeType == TokenStream.FUNCTION) {
|
||||
// In a function with both "var x" and "function x",
|
||||
// disregard the var statement, independent of order.
|
||||
vars.removeLocal(node.getString());
|
||||
String functionName = node.getString();
|
||||
if (functionName == null)
|
||||
continue;
|
||||
vars.removeLocal(functionName);
|
||||
if (ht == null)
|
||||
ht = new Hashtable();
|
||||
ht.put(node.getString(), Boolean.TRUE);
|
||||
ht.put(functionName, Boolean.TRUE);
|
||||
}
|
||||
if (nodeType != TokenStream.VAR)
|
||||
continue;
|
||||
|
||||
@@ -510,10 +510,13 @@ public class NodeTransformer {
|
||||
if (nodeType == TokenStream.FUNCTION) {
|
||||
// In a function with both "var x" and "function x",
|
||||
// disregard the var statement, independent of order.
|
||||
vars.removeLocal(node.getString());
|
||||
String functionName = node.getString();
|
||||
if (functionName == null)
|
||||
continue;
|
||||
vars.removeLocal(functionName);
|
||||
if (ht == null)
|
||||
ht = new Hashtable();
|
||||
ht.put(node.getString(), Boolean.TRUE);
|
||||
ht.put(functionName, Boolean.TRUE);
|
||||
}
|
||||
if (nodeType != TokenStream.VAR)
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user