This commit is contained in:
Ashley (Scirra) 2017-03-23 10:15:38 +00:00 committed by GitHub
commit 1a3b5fd719

View File

@ -84,6 +84,7 @@ function mangle_properties(ast, options) {
var regex = options.regex;
var ignore_quoted = options.ignore_quoted;
var debug = options.debug;
// note debug is either false (disabled), or a string of the debug suffix to use (enabled).
// note debug may be enabled as an empty string, which is falsey. Also treat passing 'true'
@ -186,6 +187,9 @@ function mangle_properties(ast, options) {
return name;
}
if (debug)
return "_$" + name + "$_";
var mangled = cache.props.get(name);
if (!mangled) {
if (debug) {