Closed krasnoperov closed 1 year ago
Closing as already fixed (duplicate)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
Nested optional chaining is not removed from ES2018 code
Input code
Config
Playground link
https://play.swc.rs/?version=1.3.66&code=H4sIAAAAAAAAA1NILCrSS8vMS9FIzVGwtVNIzbHXS9S010sCAP9xSjkZAAAA&config=H4sIAAAAAAAAA1VPSQ7DIAy85xXI5x7anqr%2BoY9A1ImI2IQdqVGUvwcI0PZmz%2BIZb4MQMJOCp9jSmJYgI2Hse0JodSw%2FCQFeA5KKOjBcGsuUKY4LFmQ%2FCWAZJ%2BRsQrpfb49qAOM9YYJHaQgrZrXT4%2FobqbwNEYn%2BhVkq3WS6%2F0wcaipY%2F14KWV%2FJdXODdM16NxN8lS2xXwdNr2Yvz%2BwHqlCzbBsBAAA%3D
Expected behavior
"use strict"; var _arr_find; (_arr_find = arr.find((el)=>{ return el === null || el === void 0 ? void 0 : el.a; })) === null || _arr_find === void 0 ? void 0 : _arr_find.b;
Actual behavior
"use strict"; var _arr_find; (_arr_find = arr.find((el)=>el?.a)) === null || _arr_find === void 0 ? void 0 : _arr_find.b;
Version
1.3.66
Additional context
No response