Dozens of failed assert console logs
tylerpalmerdev opened this issue · 4 comments
Hi there,
Love your polyfill! Solved a lot of device/browser issues for me.
A question though: how can I turn off the "Assertion Failed" errors I'm seeing in my chrome console? Here's a screenshot:
http://screencast.com/t/4xAa3zyr4fGR
Thanks in advance for the help.
This sounds like #108 - you're minifying (which removes the function names) but not removing the console.assert() calls (which check that the names are there).
The minifier I use (uglifyjs) has an option to remove console calls when minifying. You may be able to do that with your minifier or just remove them (e.g. with grep -v
) as a preliminary step to minifying.
Thanks for getting back to me so quickly, much appreciated! That explanation makes total sense. Looks like I'm using gulp-uglify in my build process. Are you talking about the "drop_debugger" flag in compress options? See here: http://lisperator.net/uglifyjs/compress.
If so, I'm including these options:
compress: {
drop_debugger: true
}
But, still getting the assert errors. Any ideas? Don't want you to spend too much time on this, but anything you can offer is appreciated!
drop_console
is the option I'm using - it's documented at https://github.com/mishoo/UglifyJS2/ but missing from the page you linked to.
@therealTP - did that work for you? I also added a note to the README.md