I'm not sure I get the logic behind the js implementation of optional chaining.
const a = {b:1}
1 > console.log(a?.c) => undefined
2 > console.log(a?.c?.d) => undefined
3 > console.log(a?.c.d) => Uncaught TypeError: Cannot read property 'd' of undefined
everything make sense so long. Then:
4 > console.log(a?.c?.d.e) => undefined
5 > console.log(a?.c?.d.e.f.g) => undefined
Accessing a property of undefined throws an error (#3), but accessing an arbitrary amout of non existing nested properties after 2 optional chaining doesn't throw errors anymore.