From: Mihai Bazon Date: Thu, 7 May 2015 12:01:16 +0000 (+0300) Subject: Make reserved names take priority over the name cache X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e48db3a8b6ce8bf06448224dbb3f6339f834ed98;p=UglifyJS.git Make reserved names take priority over the name cache --- diff --git a/lib/propmangle.js b/lib/propmangle.js index 8f291d64..d3e582d6 100644 --- a/lib/propmangle.js +++ b/lib/propmangle.js @@ -140,10 +140,10 @@ function mangle_properties(ast, options) { // only function declarations after this line function can_mangle(name) { + if (reserved.indexOf(name) >= 0) return false; if (options.only_cache) { return cache.props.has(name); } - if (reserved.indexOf(name) >= 0) return false; if (/^[0-9.]+$/.test(name)) return false; return true; }