Fix JS code generation

It seems JSError doesn't like the newline.