I tried to use the jsqueeze lib to compress my javascript in a Symfony framework application. The library did something strange with this: ``` js if ( !found ) { for ( found = [], elems = context.childNodes || context; ( elem = elems[ i ] ) != null; i++ ) { // ... } } ``` got squeezed into this: ``` js if(!i){for(i=[],a=t.childNodes||t;(r=a[s])!=null;s++;){/*...*/}} ``` Firefox (v47.0) told me then: **SyntaxError: missing ) after for-loop control** Chrome (v51.0.x) told me then: **Uncaught SyntaxError: Unexpected token ;** In fact the the last semicolon is too much. When I change the compressed line to: ``` js if(!i){for(i=[],a=t.childNodes||t;(r=a[s])!=null;s++){/*...*/}} ``` The squeezed javascript runs fine in both browsers. (The line is from jQuery v1.12.4 (uncompressed, line 4557)
I tried to use the jsqueeze lib to compress my javascript in a Symfony framework application.
The library did something strange with this:
got squeezed into this:
Firefox (v47.0) told me then: SyntaxError: missing ) after for-loop control
Chrome (v51.0.x) told me then: Uncaught SyntaxError: Unexpected token ;
In fact the the last semicolon is too much. When I change the compressed line to:
The squeezed javascript runs fine in both browsers.
(The line is from jQuery v1.12.4 (uncompressed, line 4557)