Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to transpile map function in curly brackets #1379

Open
a-x- opened this issue Feb 28, 2019 · 1 comment
Open

Fails to transpile map function in curly brackets #1379

a-x- opened this issue Feb 28, 2019 · 1 comment
Labels

Comments

@a-x-
Copy link

a-x- commented Feb 28, 2019

decaffeinate is crashing on my CoffeeScript input:

foo: ->
  <div className={ s.ticketList }>
    { tickets.map (ticket, idx) ->
      <ChatTicket key={ ticket.id || idx } {...ticket} />
    }
  </div>

repl

I get this error:

MainStage failed to parse: unexpected indentation
@eventualbuddha
Copy link
Collaborator

Looks like decaffeinate needs to place the parentheses for the map call alongside the } rather than on its own line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants