Skip to content

Commit

Permalink
fixed files form Closure #50
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent a66513f commit d90a093
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private Node tryFoldArrayJoin(Node n) {

Node right = callTarget.getNext();
if (right != null) {
if (!NodeUtil.isImmutableValue(right)) {
if (right.getNext() != null || !NodeUtil.isImmutableValue(right)) {
return n;
}
}
Expand All @@ -386,7 +386,12 @@ private Node tryFoldArrayJoin(Node n) {
return n;
}

if (right != null && right.getType() == Token.STRING
&& ",".equals(right.getString())) {
// "," is the default, it doesn't need to be explicit
n.removeChild(right);
reportCodeChange();
}

String joinString = (right == null) ? "," : NodeUtil.getStringValue(right);
List<Node> arrayFoldedChildren = Lists.newLinkedList();
Expand Down

0 comments on commit d90a093

Please sign in to comment.