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
- optional chaining/safe navigation operator
- adding liberal checks to prevent errors even if it seems unlikely that they would be needed (safety) (programming)
- be conservative in what you do, be liberal in what you accept from others (robustness principle)
- lazy loading
- 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.