handlebars_assets
handlebars_assets copied to clipboard
IE10 redeclaration of const error
Hi. I'm getting a IE10 "Redeclaration of const" error using latest version (0.20.1). It only happens when all my javascript code is compressed through out assets pipeline and in production mode. I checked and confirmed that the portion of code that provokes that is the following:
if (!window) { var window = {}; }
Thank you.
@caosenorden that snippet of code is actually not in the latest release, was in a previously release but needed to be removed for a similar reason on IE. I have a feeling you might need to clear and recompile your assets.
If that doesn't work, feel free to post what other information you have :)
I can see it at the current release: https://github.com/leshill/handlebars_assets/blob/v0.20.1/lib/handlebars_assets/handlebars.rb#L35
or master:
https://github.com/leshill/handlebars_assets/blob/master/lib/handlebars_assets/handlebars.rb#L35
Using version 0.20.1 here.
@carlosparamio that part isn't actually sent to the browser; that is only used on the backend compile because there is no 'window' object (cause there is no browser).
Sorry, you're right, we were running 0.20.0. I just tried on an empty Rails app using 0.20.1 and it wasn't there.
It was a problem on a gemspec version miss match with Gemfile.lock, on the engine that required it. Thanks.