You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
..."Variable 'parentNode' always evaluates to false here."
However, this is not the case.
To illustrate with a simpler example, in the following code:
varobj={a: 5};var{a, b =a+10}=obj;
...a from obj is destructured first to the local a, and it is then available to act as the default for b if b on obj is undefined (which in this case it is). As you can confirm in a modern JavaScript console, b will be 15 here because a is in fact available...
In my code, parentNode will not always evaluate to false because the local parentNode will be set based on the one present on target. In fact, it would, in my case, almost never be falsey...