Open schoettl opened 2 years ago
Oh, or maybe it's a bug in JS minifier https://hackage.haskell.org/package/hjsmin-0.2.0.4 for which bugs should be reported here: https://github.com/erikd/language-javascript
I use this only from a scaffolded Yesod project so I wasn't aware of internals...
Can confirm. My workaround is add a line between the open bracket and the if statement: "";
It looks like .julius is compiled to invalid JS in a certain situation:
When I use an arrow function which only contains one
if
statement, the compiler omits the curly braces of the function body. This roduces invalid JS:Uncaught SyntaxError: expected expression, got keyword 'if'
compiled to:
PS: Sorry, I never used Shakespeare alone, so I don't know how to provide a minimal example.
I can't work on this issue right now, only wanted to have it documented somewhere.