Add 'let' to the keywords list.

Uglyfied code could reach "var let=...something..." in some cases, as discovered by: https://twitter.com/colinmegill/status/702191711494144000 , so the compiled file breaks.

I don't know about UglifyJS internals but this little trick did it for me.
This commit is contained in:
Pablo Cúbico 2016-02-23 16:25:18 -03:00
parent 294861ba96
commit 385aa6383d

View File

@ -44,7 +44,7 @@
"use strict"; "use strict";
var KEYWORDS = 'break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with'; var KEYWORDS = 'break case catch const continue debugger default delete do else finally for function if in instanceof let new return switch throw try typeof var void while with';
var KEYWORDS_ATOM = 'false null true'; var KEYWORDS_ATOM = 'false null true';
var RESERVED_WORDS = 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile yield' var RESERVED_WORDS = 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile yield'
+ " " + KEYWORDS_ATOM + " " + KEYWORDS; + " " + KEYWORDS_ATOM + " " + KEYWORDS;