ruby on rails - Error during assets:precompile because of Javascript function default argument -


i use rails 4.0.0, rake assets:precompile on env - production, , have error message:

rake aborted! unexpected token operator «=», expected punc «,» (line: 15816, col: 39, pos: 465171) error @ new js_parse_error (/tmp/execjs20130828-23982-1kgxmyu.js:2357:10736) @ js_error (/tmp/execjs20130828-23982-1kgxmyu.js:2357:10955) @ croak (/tmp/execjs20130828-23982-1kgxmyu.js:2357:18665) @ token_error (/tmp/execjs20130828-23982-1kgxmyu.js:2357:18802) @ expect_token (/tmp/execjs20130828-23982-1kgxmyu.js:2357:19025) @ expect (/tmp/execjs20130828-23982-1kgxmyu.js:2357:19163) @ /tmp/execjs20130828-23982-1kgxmyu.js:2357:23402 @ /tmp/execjs20130828-23982-1kgxmyu.js:2357:23466 @ /tmp/execjs20130828-23982-1kgxmyu.js:2357:20786 @ /tmp/execjs20130828-23982-1kgxmyu.js:2357:19536 (in ~/rubymineprojects/hermes/app/assets/javascripts/application.js.erb)        ~/.rvm/gems/ruby-1.9.3-p448/gems/execjs-1.4.0/lib    /execjs/external_runtime.rb:68:in `extract_result' 

this construction raises error: function searchhelper(mymap,coords,cond=false) without default argument command finish without exit code: function searchhelper(mymap,coords,cond)

what it? can read it?

if else runs problem, might have set default value function argument, not possible in javascript code.

invalid

function hello(param = true){   ... } 

valid

function hello(param) {   if (typeof param == 'undefined')     param = true;    ... } 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -