From 28bcdbd7df403a4dca8bd2b7f327b65c8491235d Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 28 Dec 2020 02:05:59 +0000 Subject: fix corner case in `inline` (#4472) fixes #4471 --- lib/compress.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/compress.js') 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; } -- cgit v1.2.3