RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

YUI Compressor fails with issues #1242

Closed szaszendre closed 8 years ago

szaszendre commented 8 years ago

column 74: missing variable name \t␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣var buffer = maskset.buffer.slice("").reverse(), char = buffer[opts.prefix.length]; column 37: identifier is a reserved word \t␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣if ("0" === char && void 0 === maskset.validPositions[pos - 1]) return { column 29: syntax error \t␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣pos: pos, column 32: syntax error \t␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣remove: buffer.length - opts.prefix.length - 1 Compilation produced 4 syntax errors.

rice2007 commented 8 years ago

I also have this issue, but the fix is simple. char is technically a reserved word in JavaScript, and this causes YUI Compressor to fail. Rename the variable to something else, and the compressor will succeed without issue.