Skip to content
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

Having promise catch statement breaks the minification #106

Open
jpmohan1111 opened this issue Sep 12, 2018 · 1 comment
Open

Having promise catch statement breaks the minification #106

jpmohan1111 opened this issue Sep 12, 2018 · 1 comment

Comments

@jpmohan1111
Copy link

jpmohan1111 commented Sep 12, 2018

var i = document.getElementById('videoElement'); console.log(i); // i.load(); var a = i.play(); if (a !== undefined) { a.then(function() { console.log('play worked.'); }) .catch(function(error){ console.error('ERROR!!') console.error(error); }); }

I am trying to minify the above code with slimit, getting error as "Unexpected token (CATCH, 'catch')"

@metatoaster
Copy link

Exact same issue as #52, #59, #103, #105 due to keywords not being recognised as identifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants