Add optional chaining operators to _checkOutsideTargetEl
Hi. I used the library in a slightly different way than was foreseen. Overview: I have a structure of dynamic lists where elements can be moved between. In some scenarios. when I start to drag elements from one list to another, the source column dissappear. Here is my problem.
Issue: I am not sure, but I think Sortable.js don't handle scenario when source list is gone from the DOM. When it happens the _checkOutsideTargetEl function fails.
Solution: IMHO adding few "?" (as below) would fix the issue and shouldn't impact on other aspects of functionality
let _checkOutsideTargetEl = function(evt) {
if (dragEl) {
dragEl?.parentNode?.[expando]._isOutsideThisEl(evt.target);
}
};
+1
+1
+1
+1