aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-12-28 02:05:59 +0000
committerGitHub <noreply@github.com>2020-12-28 10:05:59 +0800
commit28bcdbd7df403a4dca8bd2b7f327b65c8491235d (patch)
treeb6478d1f18a790427fcba01aaec8eecee3de96c3 /lib/compress.js
parent6a8aed20496cde3b22cad7c9309ec804c71e5c84 (diff)
downloadtracifyjs-28bcdbd7df403a4dca8bd2b7f327b65c8491235d.tar.gz
tracifyjs-28bcdbd7df403a4dca8bd2b7f327b65c8491235d.zip
fix corner case in `inline` (#4472)
fixes #4471
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 58e0d785..c556c492 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -8039,7 +8039,11 @@ merge(Compressor.prototype, {
refs.forEach(function(ref) {
var def = ref.definition();
def.references.push(ref);
- if (replacing) def.replaced++;
+ if (replacing) {
+ def.replaced++;
+ } else {
+ def.single_use = false;
+ }
});
return node;
}