3 Matching Annotations
- Jan 2021
You should default to the most permissive option imo and there really is no reason to check anything until you really need to If it were left to me I'd just use optional chaining, as it also eliminates the need for no-ops
- be conservative in what you do, be liberal in what you accept from others (robustness principle)
- adding liberal checks to prevent errors even if it seems unlikely that they would be needed (safety) (programming)
- lazy loading
- optional chaining/safe navigation operator
- Oct 2020
However, IMO, having the conditional in the detach function is necessary, because there are other manifestations of this error. For example, if the DOM element in a component is removed from software outside of svelte, detach will have the same error.
IMO, the conditional needs to be added to detach to fix all manifestations of this error.