I try destructuring nested object having null value, but it cause "TypeError: cannot read property 'obj2' of null".
I read about fixing it, but it works on not nested elements.
Take a look at code snippet.
const tmp = { obj: null };
let { obj: { obj2 } = {} } = tmp || {};
I expect destructure object and obj2 to be null or undefined, but it cause error :(
It works good when I have "undefined" instead of "null", but I need case with "null".