p42ai / js-assistant

120+ refactorings and code-assists for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=p42ai.refactor
MIT License
125 stars 8 forks source link

Do not suggest destruction on optional chaining. #38

Closed lixiaoyan closed 2 years ago

lixiaoyan commented 2 years ago
const baz = window.foo?.bar.baz;

should not change to

const { baz } = window.foo?.bar;
lgrammel commented 2 years ago

@lixiaoyan thanks for the bug report! I just released v1.121.3, which fixes the bug. Please re-open this issue if you still encounter the bug in v1.121.3 or higher.