From 293c566d6c8c6082c550ce5ca358da4cde124fac Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Fri, 9 Jun 2017 04:29:12 +0800 Subject: marshal `mangle[.properties].reserved` from non-Array values (#2072) --- lib/propmangle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/propmangle.js') 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; -- cgit v1.2.3