UglifyJS/lib
Darío Javier Cravero 1fa4a660c7 fix: don't fail if definition is undefined
Running `uglifyjs --verbose --compress --mangle --screw-ie8 class.js`
with
`class.js`:
```
class Foo {
  bar() {
  }
}
```
Fails with:
```
undefined:4041
  return this.definition().unmangleable(options);
TypeError: Cannot read property 'unmangleable' of undefined
    at AST_Node.eval [as unmangleable] (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:4041:27)
    at Object.eval [as visit] (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:4214:53)
    at Object.TreeWalker._visit (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1493:24)
    at AST_Node.DEFNODE._walk (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:415:24)
    at AST_Node.eval (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:775:38)
    at Object.TreeWalker._visit (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1497:21)
    at AST_Node.DEFNODE._walk (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:774:24)
    at eval (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1303:22)
    at Array.forEach (native)
    at AST_Node.eval (eval at <anonymous> (/Users/craverod/opensource/panels/panels/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1302:29)
```
This PR sorts it out (it gives me: `class Foo{bar(){}}`) but it feels like the wrong hack.
I don't know what's best and whether we can even try to mangle the method or not, mainly because
it's the classes' external API and doing so would prevent others from using it outside the minified
source.
Thoughts?
2016-02-04 21:54:21 +00:00
..
ast.js Move the idea of a symbol having a default value up the class chain. 2016-01-19 19:22:22 +01:00
compress.js Merge branch 'master' into harmony 2015-12-26 17:59:38 +01:00
mozilla-ast.js Fix output for "use asm" code from SpiderMonkey AST 2015-11-12 12:18:25 +02:00
output.js Move the idea of a symbol having a default value up the class chain. 2016-01-19 19:22:22 +01:00
parse.js Remove duplicate error message 2016-01-19 19:22:22 +01:00
propmangle.js Make concise methods work with propmangle 2015-10-27 09:31:16 +01:00
scope.js fix: don't fail if definition is undefined 2016-02-04 21:54:21 +00:00
sourcemap.js fixes issue #621 SourceMap toString JSON format 2015-01-24 00:33:02 -08:00
transform.js Merge branch 'master' into harmony 2015-12-26 17:59:38 +01:00
utils.js Add property name mangler 2015-03-14 11:22:28 +02:00