aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 61d6079c..cfd3e2b2 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -3892,7 +3892,8 @@ merge(Compressor.prototype, {
if (is_undeclared_ref(expr) && global_pure_fns[expr.name]) return true;
if (expr instanceof AST_Dot && is_undeclared_ref(expr.expression)) {
var static_fn = static_fns[expr.expression.name];
- return static_fn && static_fn[expr.property];
+ return static_fn && (static_fn[expr.property]
+ || expr.expression.name == "Math" && expr.property == "random");
}
}
return this.pure || !compressor.pure_funcs(this);