aboutsummaryrefslogtreecommitdiff
path: root/lib/propmangle.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-06-09 04:29:12 +0800
committerGitHub <noreply@github.com>2017-06-09 04:29:12 +0800
commit293c566d6c8c6082c550ce5ca358da4cde124fac (patch)
tree5f5d201e8cc2a7a041157c32a0e7f6a242d00de1 /lib/propmangle.js
parent9c306406f14087ad0a62141bf7bb9e12afcc1a75 (diff)
downloadtracifyjs-293c566d6c8c6082c550ce5ca358da4cde124fac.tar.gz
tracifyjs-293c566d6c8c6082c550ce5ca358da4cde124fac.zip
marshal `mangle[.properties].reserved` from non-Array values (#2072)
Diffstat (limited to 'lib/propmangle.js')
-rw-r--r--lib/propmangle.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/propmangle.js b/lib/propmangle.js
index efb31cc1..f17909d7 100644
--- a/lib/propmangle.js
+++ b/lib/propmangle.js
@@ -78,7 +78,8 @@ function mangle_properties(ast, options) {
reserved: null,
});
- var reserved = options.reserved || [];
+ var reserved = options.reserved;
+ if (!Array.isArray(reserved)) reserved = [];
if (!options.builtins) find_builtins(reserved);
var cache = options.cache;