slimit
slimit copied to clipboard
Having promise catch statement breaks the minification
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')"
Exact same issue as #52, #59, #103, #105 due to keywords not being recognised as identifiers.