itmammoth / rails_sortable

Easy drag & drop sorting with persisting the arranged order for rails
MIT License
142 stars 37 forks source link

Asset pipeline error using uglifier #26

Closed robban closed 6 years ago

robban commented 6 years ago

When deploying to heroku, I got an error when rake assets:precompile ran:

ExecJS::RuntimeError: SyntaxError: Invalid assignment JS_Parse_Error.Object.defineProperty.get((execjs):3538:621)

I managed to solve this by replacing

config.assets.js_compressor = :uglifier

with

config.assets.js_compressor = Uglifier.new(harmony: true)

Is there some ES6 code in rails_sortable that makes uglifier fail without the harmony setting?

itmammoth commented 6 years ago

Oh, sorry. I didn't know Destructuring assignment was a part of ES6.

I will fix it later. Thank you.

itmammoth commented 6 years ago

rails_sortable-1.2.1 was pushed to rubygems.