From 385aa6383da9996faade35fbb61e516e8c033c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20C=C3=BAbico?= Date: Tue, 23 Feb 2016 16:25:18 -0300 Subject: [PATCH] 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. --- lib/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parse.js b/lib/parse.js index f1495153..edc50de8 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -44,7 +44,7 @@ "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 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;