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

Concatenating the scripts in development produces string js code when extra newline breaks present #436

Open
JohnMerlino2 opened this issue May 22, 2019 · 0 comments

Comments

@JohnMerlino2
Copy link

I can't reproduce this error. I don't know how to reproduce this error. I am not even sure what the error is. I just know it was an error. I was using Assets Pipeline in development, and I started to get this javascript error about it calling one of my functions but passing in invalid arguments. I traced it to this line of code:

(function() {

}).call(this);

Sprockets added this between two concatenated scripts. When I removed the trailing white space in the script before, suddenly the error went away. All I did was remove white space at the bottom of the script.

Like I said, I have no clue how to reproduce this error. All I know is it happened, and I don't know why white space at bottom of one script would generate such code.

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

No branches or pull requests

1 participant