Skip to content

Commit ce52cdf

Browse files
1 parent 6262997 commit ce52cdf

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎lib/javascript/syntax-printer.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44581,7 +44581,15 @@ const installValueOptimizers = (modules, helpers) => {
4458144581

4458244582
defineOptimizer("Dot", (self, compressor) => {
4458344583
const parent = compressor.parent();
44584-
if (compressor.is_lhs()) return self;
44584+
if (
44585+
compressor.is_lhs() ||
44586+
// A pattern writes the access, which a folded value cannot be.
44587+
(modules.corrections !== undefined &&
44588+
modules.corrections.enabled &&
44589+
isPatternTarget(self, compressor, A))
44590+
) {
44591+
return self;
44592+
}
4458544593
if (
4458644594
compressor.option("unsafe_proto") &&
4458744595
A.isDotNode(self.object) &&

0 commit comments

Comments
 (0)