aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2017-11-29 13:31:41 +0800
committerGitHub <noreply@github.com>2017-11-29 13:31:41 +0800
commitbc5047c1e70594ea2fa8e747945a577298715926 (patch)
tree8109b4339adcf09625cc61efb0a5527f35f40a96 /lib
parent206a54a7461b76683d690fd7016943fcb461a4fa (diff)
downloadtracifyjs-bc5047c1e70594ea2fa8e747945a577298715926.tar.gz
tracifyjs-bc5047c1e70594ea2fa8e747945a577298715926.zip
fix `inline` on nested substitutions (#2533)
fixes #2531
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 5b26de8b..dc761948 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -2268,6 +2268,10 @@ merge(Compressor.prototype, {
self.walk(new TreeWalker(function(node) {
if (!result) return true;
if (node instanceof AST_SymbolRef) {
+ if (self.inlined) {
+ result = false;
+ return true;
+ }
var def = node.definition();
if (member(def, self.enclosed)
&& !self.variables.has(def.name)) {