aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-04-03 12:31:05 +0800
committerGitHub <noreply@github.com>2017-04-03 12:31:05 +0800
commit59a4e56bc81ce96b3ee81ad4f068cfc7d89a4790 (patch)
treec92eb1c04b50b052d61c9f5f9431e4157535317c /lib
parent1f1fccc45df9fdc8a77d2ee3f1ae36f029b31ee9 (diff)
downloadtracifyjs-59a4e56bc81ce96b3ee81ad4f068cfc7d89a4790.tar.gz
tracifyjs-59a4e56bc81ce96b3ee81ad4f068cfc7d89a4790.zip
fix mangleProperties of `undefined` & `Infinity` (#1772)
`NaN` already works by the happy accident of `Number.NaN` fixes #1770
Diffstat (limited to 'lib')
-rw-r--r--lib/propmangle.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/propmangle.js b/lib/propmangle.js
index cfa035d2..c1e8c7e4 100644
--- a/lib/propmangle.js
+++ b/lib/propmangle.js
@@ -44,7 +44,11 @@
"use strict";
function find_builtins() {
- var a = [];
+ // NaN will be included due to Number.NaN
+ var a = [
+ "Infinity",
+ "undefined",
+ ];
[ Object, Array, Function, Number,
String, Boolean, Error, Math,
Date, RegExp