From 4d9da000fbe74d344e0e4580b138e79d4ad98ede Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期一, 01 六月 2026 11:07:14 +0800
Subject: [PATCH] 维护
---
node_modules/terser/lib/compress/inference.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/node_modules/terser/lib/compress/inference.js b/node_modules/terser/lib/compress/inference.js
index 0a3da37..d0dfcdd 100644
--- a/node_modules/terser/lib/compress/inference.js
+++ b/node_modules/terser/lib/compress/inference.js
@@ -958,10 +958,13 @@
AST_Call.DEFMETHOD("is_callee_pure", function(compressor) {
if (compressor.option("unsafe")) {
var expr = this.expression;
- var first_arg = (this.args && this.args[0] && this.args[0].evaluate(compressor));
+ var first_arg;
if (
expr.expression && expr.expression.name === "hasOwnProperty" &&
- (first_arg == null || first_arg.thedef && first_arg.thedef.undeclared)
+ (
+ (first_arg = (this.args && this.args[0] && this.args[0].evaluate(compressor))) == null
+ || first_arg.thedef && first_arg.thedef.undeclared
+ )
) {
return false;
}
--
Gitblit v1.9.3