From ae4dbcb5b96ddb2696de1d890e6a71b2445f7ec5 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Sat, 15 May 2021 19:13:30 +0100 Subject: [PATCH] document v8 quirks (#4942) closes #4941 --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7f7abae1..760fac53 100644 --- a/README.md +++ b/README.md @@ -1327,3 +1327,17 @@ To allow for better optimizations, the compiler makes various assumptions: // SyntaxError: The left-hand side of a for-of loop may not be 'async'. ``` UglifyJS may modify the input which in turn may suppress those errors. +- Later versions of Chrome and Node.js will give incorrect results with the + following: + ```javascript + console.log({ + ...console, + get 42() { + return "FAIL"; + }, + [42]: "PASS", + }[42]); + // Expected: "PASS" + // Actual: "FAIL" + ``` + UglifyJS may modify the input which in turn may suppress those errors.