-
Notifications
You must be signed in to change notification settings - Fork 53
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
Unexpected token return #10
Comments
Can you also show your skim and slim versions? |
I'm sure problem is here, but I don't know how it affect latest sprockets. |
|
It is very strange. It should be wrapped with function(){}. Here is my templates (function() {
this.JST || (this.JST = {});
this.JST["import/field_form"] = (function() {
return function(context) {
if (context == null) context = {};
return Skim.withContext.call({}, context, function() { |
@kossnocorp CoffeeScript.compile should definitely wrap src in function(){}. |
Yup, It's more than strange. Btw my fix (you can see it above) doesn't help. |
Please |
I don't know how, I don't know why, but problem is disappear after few server restarts. Sorry for bothering. |
After few hours of work, this issue is again bother me. This is my Gemfile.lock. |
This issue differently related to coffee-script-source version, that's why:
$ irb
1.9.3p125 :001 > require 'rubygems'
=> false
1.9.3p125 :002 > require 'coffee_script'
=> true
1.9.3p125 :003 > CoffeeScript.compile('(context = {}) ->')
=> "\n (function(context) {\n if (context == null) context = {};\n });\n"
$ irb
1.9.3p125 :001 > require 'rubygems'
=> false
1.9.3p125 :002 > require 'coffee_script'
=> true
1.9.3p125 :003 > CoffeeScript.compile('(context = {}) ->')
=> "(function() {\n\n (function(context) {\n if (context == null) context = {};\n });\n\n}).call(this);\n" |
This fix working well for me. |
Merged, thanks. |
Add `coffee-script-source >= 1.2.0` to dependencies (closes appjudo#10)
Screenshot illustrates the problem:
The text was updated successfully, but these errors were encountered: