Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

also don't inline objects if they're in lists

  • Loading branch information...
commit fc5c2e5497a3667fb9cfeaa7a44cd7c728a6f330 1 parent f197a4e
Mike Blume authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/js2coffee.coffee
View
7 lib/js2coffee.coffee
@@ -337,7 +337,10 @@ class Builder
# A parameter list.
'list': (n) ->
- list = _.map(n.children, (item) => @build(item))
+ list = _.map(n.children, (item) =>
+ if n.children.length > 1
+ item.is_list_element = true
+ @build(item))
list.join(", ")
@@ -510,7 +513,7 @@ class Builder
if n.children.length == 0
"{}"
- else if n.children.length == 1 and not n.is_property_value
+ else if n.children.length == 1 and not (n.is_property_value or n.is_list_element)
@build n.children[0]
else
Please sign in to comment.
Something went wrong with that request. Please try again.