diff --git a/package.json b/package.json index 79ad9ed22..ca601f242 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "crypto-md5": "^1.0.0", "css": "2.2.3", "debug": "4.3.1", - "esotope-hammerhead": "0.6.2", + "esotope-hammerhead": "0.6.3", "http-cache-semantics": "^4.1.0", "iconv-lite": "0.5.1", "lodash": "^4.17.20", diff --git a/test/server/script-processor-test.js b/test/server/script-processor-test.js index 10afcda8e..d99c38725 100644 --- a/test/server/script-processor-test.js +++ b/test/server/script-processor-test.js @@ -1513,6 +1513,15 @@ describe('Script processor', () => { }); }); + it('Should not lose parentheses around logical expressions inside nullish coalescing', () => { + testProcessing([ + { + src: 'i[s]=n[s]??(a&&a[s])', + expected: '__set$(i,s,__get$(n,s)??(a&&__get$(a,s)))', + }, + ]); + }); + it('Should not lose the await keyword in "for await...of" loop', () => { testProcessing({ src: 'i[j] = async () => {' +